Realize the title bar drag

zhaozj2021-02-17  80

Option ExplicitPublic Declare Function ReleaseCapture Lib "user32" () As LongPublic Declare Function SendMessage Lib "user32" Alias ​​"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPublic Const WM_NCLBUTTONDOWN = & HA1Public Const htcaption = 2

Private sub Image1_mousedown (Button as Integer, Shift As Integer, x as single, y as single) ReleaseCapture SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0 & End Sub

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

New Post(0)