|
-
Nov 13th, 2000, 05:01 AM
#1
Thread Starter
Junior Member
Hi everybody!
can anyone tell me agood way of making an image float randomly around the screen? i've tried 'do until ' and 'if then' without getting the results I want.
Thanks in advance for any suggestions.
-
Nov 13th, 2000, 08:59 AM
#2
Fanatic Member
how do you mean float randomly?
Like disappear from one set of coordinates and appearing at another? following a path from one set of coordinates to another? what is it for? screen saver? game?
a little more info for us to help out if you could
-
Nov 13th, 2000, 03:44 PM
#3
Thread Starter
Junior Member
re moving image
Hi !
Thanks for the reply,yes I want to use this in a screensaver
by moving randomly I mean move up the screen until it hits the top and then say 'bounce' off and move back down at a new angle etc.
thanks!!
-
Nov 13th, 2000, 04:14 PM
#4
Frenzied Member
try the msdn example 'blanker.' It has a moon bounce around the screen.
retired member. Thanks for everything 
-
Nov 13th, 2000, 07:06 PM
#5
You could have floating object moving around horizontally and vertically.
Code:
Private Sub Timer1_Timer()
'Vertical
Do Until Me.Top = 0
Me.Top = Me.Top - 10
DoEvents
Loop
Do Until Me.Top = Screen.Height
Me.Top = Me.Top + 10
DoEvents
Loop
Timer1_Timer
End Sub
Private Sub Timer2_Timer()
'Horizontal
Do Until Me.Left = 0
Me.Left = Me.Left - 10
DoEvents
Loop
Do Until Me.Left = Screen.Width
Me.Left = Me.Left + 10
DoEvents
Loop
Timer2_Timer
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|