The picture1 is one of the choices in the first question and it is the correct answer. So if the player clicked it, i will give him 1 point which i want to be placed at the label1. Actually my problem is solved i will just do it like this:
@Abe, your code will not work. You need to declare the sum first -
It still works without declaring sir ;)
Have a look at this, I included the code for the Picture controls.
Private Sub Command1_Click()
Sum = Val(Label1.Caption) + Val(Label2.Caption)
Label3.Caption = Str(Sum)
Private Sub Picture1_Click()
Label1.Caption = "1"
Private Sub Picture2_Click()
Label2.Caption = "1"
No it will not. If the OP starts with more advanced coding, he is going to fall into a pitfall, bugging his application. If we do give advice, we give the correct advice.:)
It still works without declaring sir
It will because "Sum" is a function within vb6. What if the OP uses it as a string, as you suggested? This means that if a user adds MyPic12345 it will be declared, as where an integer will throw an error, only wanting numbers, 12345. This is the correct way to make your application bug free.;)
@Abe, sir andre is right, we need to declare variables even if vb6 accept and run without declaring any variable. Try to put this code on the General Declaration area so you will not forget to declare your variables :D
You can also make vb6 automatically adds option explicit by going to Tools > Options > Editor Tab > then tick "Require Variable Declaration" > Ok.
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...