AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > VB编程

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

51自学网 http://www.wanshiok.com
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设计更换屏幕保护的程序  下一篇:解除网虫心病 VB做定时断线程序