Oups le voici.
Public Class Form1
Dim pas1 As Image = My.Resources.a1
Dim pas2 As Image = My.Resources.a2
Dim pas3 As Image = My.Resources.a3
Dim pas4 As Image = My.Resources.a4
Dim pas5 As Image = My.Resources.a5
Dim pas6 As Image = My.Resources.a6
Dim pas7 As Image = My.Resources.a7
Dim pas8 As Image = My.Resources.a8
Dim pas9 As Image = My.Resources.a9
Dim pas10 As Image = My.Resources.a10
Dim pas11 As Image = My.Resources.a11
Dim pas12 As Image = My.Resources.a12
Dim pas13 As Image = My.Resources.a13
Dim pas14 As Image = My.Resources.a14
Dim pas15 As Image = My.Resources.a15
Dim pas16 As Image = My.Resources.a16
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PictureBox1.BackgroundImage = pas1
End Sub
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If Rectangle.Intersect(PictureBox1.Bounds, Me.ClientRectangle) <> PictureBox1.Bounds Then
MessageBox.Show("picturebox1 est sorti du formulaire")
End If
If e.KeyCode = Keys.NumPad8 Then 'haut
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 1)
End If
End If
If e.KeyCode = Keys.NumPad2 Then 'bas
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 1)
End If
End If
If e.KeyCode = Keys.NumPad4 Then 'left
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y)
End If
End If
If e.KeyCode = Keys.NumPad6 Then 'right
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y)
End If
End If
If e.KeyCode = Keys.NumPad9 Then 'haut droit
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y - 1)
End If
End If
If e.KeyCode = Keys.NumPad7 Then 'haut gauche
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y - 1)
End If
End If
If e.KeyCode = Keys.NumPad3 Then 'bas droit
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X + 1, Me.PictureBox1.Location.Y + 1)
End If
End If
If e.KeyCode = Keys.NumPad1 Then 'bas gauche
If PictureBox1.BackgroundImage Is Me.pas1 Then
PictureBox1.BackgroundImage = pas2
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas3
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas4
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas5
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas5 Then
PictureBox1.BackgroundImage = pas6
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas7
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas8
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas9
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas9 Then
PictureBox1.BackgroundImage = pas10
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas11
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas12
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas13
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
ElseIf PictureBox1.BackgroundImage Is Me.pas13 Then
PictureBox1.BackgroundImage = pas14
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas15
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas16
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
PictureBox1.BackgroundImage = pas1
Me.PictureBox1.Location = New System.Drawing.Point(Me.PictureBox1.Location.X - 1, Me.PictureBox1.Location.Y + 1)
End If
End If
End Sub
End Class