Question making objects move diagonaly

BlackOut

New member
Joined
Nov 11, 2009
Messages
2
Programming Experience
Beginner
Hi,
Im quite new to all this forum stuff xD
I started programming in visual basic in college about two months ago and really enjoyed it.

But I need help, Im trying to make a radiobutton move diagonaly, (Dont ask why a radiobutton, i did it in college last week) For some strange reason though I need another radiobutton just going across the screen in order for my diagonal radiobutton to move.

I would like to develop this into a game like pong, when I have gone further into VB.

Any help would be great :)
If Im not clear on anything just tell me and ill try to explain it more clearly.
 
Last edited:
Do you mean something like:
VB.NET:
Do
   rb1.Top += 1
   rb1.Left += 1
Loop Until rb1.Top = 200
 
Even more fun - Form 300,300 with 1 button:
VB.NET:
' buttom click event
Dim topM As Boolean
Dim leftM As Boolean
    Do
      If topM Then
        Button1.Top += 1
      Else
        Button1.Top -= 1
      End If
      If leftM Then
        Button1.Left += 1
      Else
        Button1.Left -= 1
      End If
      If Button1.Top = 240 Then topM = False
      If Button1.Top = 0 Then topM = True
      If Button1.Left = 0 Then leftM = True
      If Button1.Left = 214 Then leftM = False
      Application.DoEvents()
    Loop
 
haha thanks, that is really cool xD
i didnt even know you could do anything like that tbqh.
 
Back
Top