怎么实现BorderStyle设成0的窗体的移动??
2个回答
展开全部
'拖动窗体任意位置移动窗体
Dim ctX As Single, ctY As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ctX = X: ctY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Me.Move Me.Left - ctX + X, Me.Top - ctY + Y
End Sub
Dim ctX As Single, ctY As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ctX = X: ctY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Me.Move Me.Left - ctX + X, Me.Top - ctY + Y
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询