Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture disppears at the form
Message
From
16/07/1999 11:22:14
 
 
To
15/07/1999 03:34:41
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00241188
Message ID:
00242326
Views:
22
Victor
Vb have to know that your picture is moving up and down
or left or right

for this you could use a code like the one below.
Be aware that this is assuming a form of 3500 times 3500
you will need to customize to your size and properties
dont forget to dim moveleft as boolean in the form

--------
If moveleft Then
Picture1.Move Picture1.Left - 200, Picture1.Top
If Picture1.Left <= 0 Then moveleft = False
Else
Picture1.Move Picture1.Left + 200, Picture1.Top
If Picture1.Left > 3500 Then moveleft = True
End If

If moveup Then
Picture1.Move Picture1.Left, Picture1.Top - 200
If Picture1.Top <= 0 Then moveup = False
Else
Picture1.Move Picture1.Left, Picture1.Top + 200
If Picture1.Top > 3500 Then moveup = True
End If

----------------
Rolando,

I've tried putting the code on the timer event with an interval of 1, still it doesn't work. it seems
that the picture just go down and then disappears.

I'm trying to simulate a bouncing picture by moving it left and up and if the picture reaches
the top of the form it will move left and down.
Previous
Reply
Map
View

Click here to load this message in the networking platform