MoveFormNoBar (7)




Dim MoveNow As Boolean
Dim OldX As Single
Dim OldY As Single
Private Sub Form_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
OldX = X
OldY = Y
MoveNow = True
End If
End Sub

Private Sub Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
If MoveNow Then
Move (Left + X - OldX), (Top + Y - OldY)
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
MoveNow = False
End If
End Sub

'Assumes:

open a blank form and set the BordetStyle to 0
and put the following codes in the form










( moveformnobar7.html )- by Paolo Puglisi - Modifica del 17/12/2023