View Full Version : [VB6] drag & Drop
come faccio a visualizzare il testo di ciņ che sto trascinando?
(al posto del rettangolo)
grazie anticipatamente
Ci sono vari drag & drop
Quello interno alla form e quello da fuori a dentro alla form
Fammi capire bene cosa ti serve...
ciao ho una listbox da dove prendo i dati e una text dove metto i dati.
uso una label come appoggio
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.Caption = List1.Text
Label2.Top = Y + List1.Top
Label2.Left = X + List1.Left
Label2.Drag
End Sub
Private Sub Text1_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
If List1.ListIndex = -1 Then
If List1.ListCount < 0 Then
MsgBox "non ci sono elementi da trascinare"
Exit Sub
End If
Exit Sub
Else
Text1(Index).Text = Label2.Caption
List1.RemoveItem List1.ListIndex
End If
End Sub
vBulletin® v3.6.4, Copyright ©2000-2026, Jelsoft Enterprises Ltd.