VB怎样才能在窗体的任何部位拖动窗口
VB怎样才能在窗体的任何部位拖动窗口就像QQ2009和QQ2009安装程序那样我是说在任何部位啊不光是标题栏...
VB怎样才能在窗体的任何部位拖动窗口
就像QQ2009和QQ2009安装程序那样
我是说在任何部位啊
不光是标题栏 展开
就像QQ2009和QQ2009安装程序那样
我是说在任何部位啊
不光是标题栏 展开
展开全部
窗体的move事件
Dim xa As Single, ya As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
xa = X
ya = 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 + X - xa, Me.Top + Y - ya
End Sub
Dim xa As Single, ya As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
xa = X
ya = 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 + X - xa, Me.Top + Y - ya
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
vb本来就可以拖动窗体的啊,鼠标放在窗体框上边按住左键随你怎样么拖都行
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询