实现无边框移动
im i, x1 As Double, y1 As Double, x2 As Double, y2 As DoublePrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
i = 1
x1 = X
y1 = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If i = 1 Then
x2 = X - x1+form1.left
y2 = Y - y1+form1.top
form1.move x2,y2
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
i = 0
End Sub Thanks.......nice! 恩,谢谢啦 这是一个很经典的问题。有很多种方法,如调用API
但是如果窗体被一些控件填满了,怎样在控件上拖动窗体呢?
页:
[1]