Salut...
J'utilise un PictureBox et j'y dessine des éléments.
Il y a un zoom In/Out et donc je peux me déplacer avec le stylet...
Je t'annexe le code.
En espérant que ca pourra t'aider
bye
PrivateSub PictureBox1_MouseDown(ByVal sender AsObject, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
PointDepart = New Point(e.X, e.Y)
EndSub
PrivateSub PictureBox1_MouseMove(ByVal sender AsObject, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
'On Calcule la nouvelle coordonnée de l'origine du PictureBox
Dim DeltaX AsInteger = (PictureBox1.Location.X + e.X - PointDepart.X)
Dim DeltaY AsInteger = (PictureBox1.Location.Y + e.Y - PointDepart.Y)
'On bloque le déplacement aux limites du pictureBox
If PictureBox1.Width > X_initial Then
If -DeltaX > (PictureBox1.Width - X_initial) Then
DeltaX = X_initial - PictureBox1.Width
EndIf
If DeltaX > 0 Then
DeltaX = 0
EndIf
Else
DeltaX = 0
EndIf
If PictureBox1.Height > Y_initial Then
If -DeltaY > (PictureBox1.Height - Y_initial) Then
DeltaY = Y_initial - PictureBox1.Height
EndIf
If DeltaY > 0 Then
DeltaY = 0
EndIf
Else
DeltaY = 0
EndIf
PictureBox1.Location = New Drawing.Point(DeltaX, DeltaY)
EndIf
EndSub