Post by Izy Coder on Apr 25, 2015 16:31:37 GMT 10
how do I make a moving panel without timer? I want to make the panel moving, like throwing something. When i set the height to 120 then force to 50. the panel will moving like this Panel1.location = New Point (+1,+1) it just like for every x second it will moving to the right +1 and up +1. then if the position of Y reaches height (120), it will moving down to the right. and for the second one (force) will be the distance of the panel. Like this : ........................................height first position...............................................................force to this place the panel from "first position" then go to "height" and back down to "force to this place" (ignore the dotted) Anyway to make panel moving like this? without timer. I use do while... but it not work. this is my code. Do While Panel.location etc... panel.location.x += 1 '<< this not work error : expression is a value and therefore cannot be the target of an assignment if I change to Do While Panel.location etc... panel.location += New Point (1,1) '<< this will magically make the panel appear at the "height" and than to "force place" without moving.
Check Out My Project At VSlang InternetTM. More Project : - Poroxnoss Text Editor 2 - Added soon...
- TAP 2D Game Maker - Coming really soon...
- Easy Desktop - Discontinue..
|
|
Post by Imformas on Apr 25, 2015 20:33:40 GMT 10
you could use a for loob For i As Integer = 0 To 120
Panel1.Location = new Location(i, 0) ' + to move to the right, - to move to the left.
Next
For i As Integer = 0 To 120
Panel1.Location = new Location(0, i) ' + to move to the Up, - to move to the Down.
Next
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by dar on May 29, 2015 22:10:29 GMT 10
Why not just use left or top instead of location?
|
|