plaineR
Messages postés237Date d'inscriptionmercredi 26 novembre 2003StatutMembreDernière intervention 6 décembre 20054 20 janv. 2004 à 17:59
Tu n'as pas besoin de connaitre la textbox d'arrivée pour faire une drag and drop.
Si tu veux déplacer le text1 vers text2 voici le code (sinon il n'y a qu'à inverser) :
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Drag
End Sub
Private Sub Text2_DragDrop(Source As Control, X As Single, Y As Single)
Dim src As String
If Source = Text1 Then
src = Text1.Text
Text1.Text = Text2.Text
Text2.Text = src
End If
End Sub