Just click on your form and Move it on your screen. Useful utility for the forms without title bar.
Just click on your form and Move it on your screen. Useful utility for the forms without title bar.
API Declarations
Private Type POINTAPI
xx As Long
yy As Long
End Type
Private cuX As Integer, cuY As Integer
Private frmX As Integer, frmY As Integer
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Rate Just click on your form and Move it on your screen. Useful utility for the forms without title bar.
(1(1 Vote))
MousePointer = 5
errX = 0
errY = 0
Dim co As POINTAPI
i = GetCursorPos(co)
frmX = Form1.Left
frmY = Form1.Top
cuX = co.xx * 15
cuY = co.yy * 15
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim co As POINTAPI
i = GetCursorPos(co)
If Button = 1 Then
errX = co.xx * 15 - cuX
errY = co.yy * 15 - cuY
Form1.Left = frmX + errX
Form1.Top = frmY + errY
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MousePointer = 0
End Sub
Just click on your form and Move it on your screen. Useful utility for the forms without title bar. Comments
No comments yet — be the first to post one!
Post a Comment