|
-
Sep 1st, 2010, 10:58 AM
#2
Frenzied Member
Re: Moving an image with the stylus..
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
bDragging = True
sx = e.X
sy = e.Y
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
bDragging = False
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If bDragging Then
With PictureBox1
nx = .Left - sx + e.X
ny = .Top - sy + e.Y
.Location = New System.Drawing.Point(nx, ny)
End With
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|