***IMPORTANT READ***
This is a vid about animation using the keypads on visual basic 2008. To use this program u need these two pics which can be copied from http://img121.imageshack.us/i/bat1a.png/ AND http://img5.imageshack.us/i/bat1b.png/ . Just copy the two pics and paste into a place where u know where it is.
***CODE***
Public Class Form1
Dim x As Integer = 0
Dim y As Integer = 0
Dim cycle As Integer = 0
Dim flip As Boolean = False
______________________________________________
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Right Then
x = 5
flip = False
ElseIf e.KeyCode = Keys.Left Then
x = -5
flip = True
ElseIf e.KeyCode = Keys.Up Then
y = -5
ElseIf e.KeyCode = Keys.Down Then
y = 5
End If
End Sub
______________________________________________
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.Right Or e.KeyCode = Keys.Left Or e.KeyCode = Keys.Up Or e.KeyCode = Keys.Down Then
x = 0
y = 0
End If
End Sub
______________________________________________
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If cycle Mod 2 = 0 Then
Me.PictureBox1.Image = My.Resources.bat1_a
Else
Me.PictureBox1.Image = My.Resources.bat1_b
End If
If flip = True Then
Me.PictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX)
End If
Me.PictureBox1.Left = Me.PictureBox1.Left + x
Me.PictureBox1.Top = Me.PictureBox1.Top + y
cycle += 1
End Sub
End Class
______________________________________________
DONT FORGET TO SUB AND COMMENT!!!!!
No forum --> form :D
themasterphp 8 months ago
@themasterphp lol yes I know sorry. I guess I was rushing and didnt see that :P
MrShadeslayer 8 months ago
where did you find the cursor
Ascolta
BlAdEInAzUmAFiRe00 8 months ago
@BlAdEInAzUmAFiRe00
The program that I used to record with, Camtasia, has that cursor.
MrShadeslayer 8 months ago
nice work
MrHelsinko 1 year ago
@MrHelsinko thanks man
MrShadeslayer 1 year ago