|
-
Apr 30th, 2003, 04:30 PM
#1
Thread Starter
Lively Member
Animate Object to Coordinates
I'm looking for some example code to help me code how a 16x16 picturebox will animate to x,y coordinates using a timer.tick event
Picture Box start point is 100,100
Its End Point is unkown... it could be 200,200 or 101,100 for example.
I need a b-line to this new coordinate. and how fast it gets there depends on the timer.interval property,
Thankx for any help
Last edited by Evad; May 1st, 2003 at 03:27 AM.
-
May 1st, 2003, 03:39 AM
#2
Thread Starter
Lively Member
-
May 6th, 2003, 06:40 PM
#3
New Member
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer9.Tick
If PictureBox1.Left = 96 Then
Timer1.Enabled = False
Else
PictureBox1.Left = PictureBox1.Left + 2
PictureBox1.Refresh()
End If
End Sub
hope this helps dude... the only problem i see with this is if u have a slow computer the refresh call really slows it down. there has to be a better way..right?
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
|