无框窗体移动最简法(程序)

2008-02-23 06:49:30来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

Dim i, x1 As Double, y1 As Double, x2 As Double, y2 As Double
Private 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.lift
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

上一篇: 解除网虫心病 VB做定时断线程序
下一篇: 用Visual Basic也可以实现P2P

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:VB 从零开始编外挂(七)

下一篇:VB中让窗体始终处于最前面