X = m_MousePosX - e.X
m_DriftY = m_MousePosY - e.Y
m_Leftx = m_Leftx - m_DriftX
m_Lefty = m_Lefty - m_DriftY
picturemove(sender, e)
Me.Cursor = System.Windows.Forms.Cursors.Arrow
m_DriftY = m_MousePosY - e.Y
m_Leftx = m_Leftx - m_DriftX
m_Lefty = m_Lefty - m_DriftY
picturemove(sender, e)
Me.Cursor = System.Windows.Forms.Cursors.Arrow
End Sub
'根据偏移量计算出的图片位置,重画图片
Private Sub picturemove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim myBit As New System.Drawing.Bitmap(PictureBox1.Image)
Dim myPicGrh As System.Drawing.Graphics = Me.PictureBox1.CreateGraphics
myPicGrh.Clear(Me.PictureBox1.BackColor)
myPicGrh.DrawImageUnscaled(myBit, m_Leftx - 152, m_Lefty)
myBit.Dispose()
myPi
| 对此文章发表了评论 |

