Jumat, 02 April 2010

Option Explicit
Public Const LP_HT_CAPTION = 2
Public Const WM_NCLBUTTONDOWN = &HA1
Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
'-- End --'

Then add this code to the form:

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim retVal As Long
' Release the capture
retVal = ReleaseCapture
' Send a message to Form1 saying we clicked it's Caption
' so that it will move around.

retVal = SendMessage(Form1.hwnd, WM_NCLBUTTONDOWN, _
LP_HT_CAPTION, ByVal 0&)
End Sub



0 komentar:

Posting Komentar

Mohon Tidak Mengirim Spam : Karena Setiap Spam akan kami hapus