vb 点击控件移动窗体

vb 点击控件移动窗体,第1张

概述添加模块 代码如下:Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lparam As Any) As LongPublic Declare Function Release
添加模块  代码如下:Public Declare Function SendMessage lib "user32" Alias "SendMessageA" (ByVal hwnd As Long,ByVal wMsg As Long,ByVal wParam As Long,lparam As Any) As LongPublic Declare Function ReleaseCapture lib "user32" () As LongPublic Sub DoDrag(TheForm As Form)    If TheForm.windowstate <> vbMaximized Then        ReleaseCapture        SendMessage TheForm.hwnd,&HA1,2,0&            End IfEnd Sub在该控件的方法调用:Private Sub Label1_MouseDown(button As Integer,Shift As Integer,X As Single,Y As Single)DoDrag MeEnd Sub
总结

以上是内存溢出为你收集整理的vb 点击控件移动窗体全部内容,希望文章能够帮你解决vb 点击控件移动窗体所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1288283.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存