-
I am making a slot machine game. well to put coins in you click on a money bag and drag it up to the coin slot. you can put up to 3 coins in. But I have a problem. When I put this in the destination control:
Code:
Private Sub hhh_DragDrop(Source As Control, X As Single, Y As Single)
coinsin = coinsin + 1
Label3.Caption = "Coins In:" & coinsin
End Sub
It displays one coin in but when you go to put more coins in it doesnt show!!! HELP!!
-
Where do you have coinsin declared?
-
Change your code to this:
Code:
Private Sub hhh_DragDrop(Source As Control, X As Single, Y As Single)
Static coinsin As Integer
coinsin = coinsin + 1
Label3.Caption = "Coins In:" & coinsin
End Sub
This should solve the problem.
-
-
Strange, it works fine for me. Can you give me some more code, maybe there's a bug somewhere.
-