vb移动窗体的代码
Option Explicit Private Declare Function ReleaseCapture Lib "user32" () As Long Private Sub Form_MouseDown(Button As Integer,Shift As Integer,x As Single,Y As Single) Private Sub Form_MouseDown(Button As Integer,X As Single,Y As Single) If Button And vbLeftButton Then mX = X: mY = Y End IfEnd Sub Private Sub Form_MouseMove(Button As Integer,Y As Single) If Button And vbLeftButton Then Me.Move Me.Left - mX + X,Me.Top - mY + Y End IfEnd Sub (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |