Private Declare Function SetCapture Lib "user32" (ByVal hWnd) As Long As Long
Private Declare Function ReleaseCapture Lib "user32 () As" Long
Private Sub Text1_MouseMove (Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
With Text1
If the Button=0 Then
If (X & lt; 0) Or (Y & lt; 0) Or (X & gt; Width) Or (Y & gt; Height) Then
ReleaseCapture
'the code is put in the mouse left
MsgBox "out"
The Else
SetCapture. The hWnd
End the If
End the If
End With
End Sub
This is text1 have moved to remove event, if you have any text1 form (1), text (2), text3 (), how to change
CodePudding user response:
The impression of post discussed:) last yearCodePudding user response: