16
Февраль
2009
Как перемещать форму не за заголовок?
Как перемещать форму не за заголовок?
Option Explicit Private Declare Function SendMessage Lib _ "user32" Alias "SendMessageA" _ (ByVal hWnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long Private Declare Function ReleaseCapture Lib "user32" () As Long Const WM_NCLBUTTONDOWN = &HA1 Const HTCAPTION = 2 Private Sub Form_MouseDown(Button As Integer, _ Shift As Integer, X As Single, Y As Single) Call ReleaseCapture Call SendMessage(Me.hWnd, _ WM_NCLBUTTONDOWN, HTCAPTION, 0&) End Sub