Home > Software engineering >  How to make the text control group has moved to remove events
How to make the text control group has moved to remove events

Time:10-10

 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 year

CodePudding user response:

reference 1st floor bcrun response:
discussed the impression in the last year have posts:)

Right, has a similar post
I moved here
N many TextBox portal to deal with the same event

CodePudding user response:

Private Sub Text1_MouseMove (Index As an Integer, the Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
With Text1 (Index)

CodePudding user response:

If you can use the control array, use the control array,

Weak control array, use the aphids, the processing method is more convenient,
  • Related