'Bu kısmı MODÜL'e ekleyin
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
Public Const ButonTut = &HA1
Public Const frmbaşlığı = 2
Public Sub DragForm(hWnd As Long, intButton As Integer)
On Error Resume Next
If intButton = vbLeftButton Then
ReleaseCapture
SendMessage hWnd, ButonTut, frmbaşlığı, 0
End If
End Sub
'------------------------------------------------------------------
'FORM' a Bir textbox ve picturebox ekleyin
Private Sub Command1_Click()
End
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragForm Form1.hWnd, 1
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragForm Picture1.hWnd, 1
End Sub
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragForm Text1.hWnd, 1
End Sub