简单:
Dim oX, oY
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
   oX = X: oY = Y
End SubPrivate Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> 1 Then Exit Sub
Image1.Move Image1.Left + X - oX, Image1.Top + Y - oX
End Sub

解决方案 »

  1.   

    TO:hand2001(我爱VB不爱我) 
    的确行,不过怎么鼠标点击一下image就会改变位置,您帮我解决一下
    我马上给分
      

  2.   

    Dim oX, oYPrivate Sub Image1_DragDrop(Source As Control, X As Single, Y As Single)
     Image1.Left = Image1.Left + (X - oX)
     Image1.Top = Image1.Top + (Y - oY)End SubPrivate Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
      Image1.Drag
      oX = X
      oY = Y
    End SubPrivate Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
     Image1.Left = X - oX
     Image1.Top = Y - oY
    End Sub
      

  3.   

    前几天刚解决了这个问题,要的话给个EMAIL,我发给你。
    若能对你有所帮助,我将非常高兴! 
      

  4.   

    to: zdmaster(哈哈)
    把Dim oX, oY移到过程外就可以了,前两天我也犯了这个错误,ox,oy是全局变量
      

  5.   

    zdmaster(哈哈) (2002-1-7 12:53:33)  得0分 
    TO:hand2001(我爱VB不爱我) 
    的确行,不过怎么鼠标点击一下image就会改变位置,您帮我解决一下
    我马上给分  
    *****************************************
    因该不会有这个问题。
      

  6.   

    to:cy_nwau
    [email protected]
    谢谢了