我做了一个窗口,标题栏我是用IMAGE控件做的,这就存在个问题,这个窗口拖动不了。请问大家这种问题如何解决?

解决方案 »

  1.   

    拖动窗口要利用句柄,你用的IMAGE控件有没有句柄?
      

  2.   


    Dim MovX As Long, MovY As Long
    Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
       If Button = 1 Then
          MovX = X: MovY = Y
       End If
    End SubPrivate Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
       If Button = 1 Then
          Me.Move Me.Left + (X - MovX), Me.Top + (Y - MovY)
       End If
    End Sub