Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.53 KB | None | 0 0
  1.         While True
  2.             Dim Retval, Retval2 As Long
  3.             Retval = GetAsyncKeyState(VK_LEFT)
  4.             Retval2 = GetAsyncKeyState(VK_RIGHT)
  5.             If CBool(Retval And &H8000) Then
  6.                 PictureBox1.Location = New Point(PictureBox1.Location.X - 2,                                   PictureBox1.Location.Y)
  7.  
  8.             ElseIf CBool(Retval2 And &H8000) Then
  9.                 PictureBox1.Location = New Point(PictureBox1.Location.X + 2, PictureBox1.Location.Y)
  10.             End If
  11.             Thread.Sleep(speed)
  12.         End While
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement