06 05 2007

Başlıksız Formu Taşımak

(General)(Declaration)
Private Declare Function ReleaseCapture Lib "user32" () As Long
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 Const WM_NCLBUTTONDOWN = &HA1

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
If Button = 1 Then ‘ Farenin sol tuşu basılı iken
ReleaseCapture
r% = SendMessage(Me.hwnd, WM_NCLBUTTONDOWN, 2, 0)
End If
End Sub

0 yorum: