Mobile form without title

zhaozj2021-02-11  170

We generally use the mouse to press the title bar of the window, then move the window, when the window does not have the title bar, we can move the window with the following method: declare in the BAS file: Declare Function ReleaseCapture LIB "User32" () As longdeclare Function SendMessage Lib "user32" _Alias ​​"SendMessageA" (_ByVal hwnd As Long, ByVal wMsg As Long, _ByVal wParam As Long, lParam As Any) As LongPublic Const HTCAPTION = 2Public Const WM_NCLBUTTONDOWN = & HA1 then, in Form_MouseDown event: Private Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) ReleaseCapturesendMessage HWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0 & END SUB

转载请注明原文地址:https://www.9cbs.com/read-5877.html

New Post(0)