während des Drag-Vorganges zu verändern, indem ich (wie im Explorer)
die Shift-Taste nachträglich drücke?
(basierend auf folgendem Drag and Drop-Code von ts-soft)
Code: Alles auswählen
If OpenWindow(0, 200, 200, 430, 400, "Drag & Drop", #PB_Window_SystemMenu)
CreateGadgetList(WindowID(0))
ExplorerListGadget(1, 10, 10, 200, 380, "*", #PB_Explorer_MultiSelect)
ExplorerListGadget(2, 210, 10, 200, 380, "*", #PB_Explorer_MultiSelect)
EnableGadgetDrop(1, #PB_Drop_Files, #PB_Drag_Copy | #PB_Drag_Move)
EnableGadgetDrop(2, #PB_Drop_Files, #PB_Drag_Copy | #PB_Drag_Move)
Repeat
event = WaitWindowEvent(0)
If event = #PB_Event_Gadget And EventType() = #PB_EventType_DragStart
Files$ = ""
If EventGadget() = 1 ;wird beim drag vom ExplorerList 1 ausgeführt
For i = 0 To CountGadgetItems(1)-1
If GetGadgetItemState(1, i) & #PB_Explorer_Selected
Files$ + GetGadgetText(1) + GetGadgetItemText(1, i) + Chr(10)
EndIf
Next i
Debug Files$
EndIf
If EventGadget() = 2 ;wird beim drag vom ExplorerList 1 ausgeführt
For i = 0 To CountGadgetItems(2)-1
If GetGadgetItemState(2, i) & #PB_Explorer_Selected
Files$ + GetGadgetText(2) + GetGadgetItemText(2, i) + Chr(10)
EndIf
Next i
Debug Files$
EndIf
DragFiles(Files$)
ElseIf event = #PB_Event_GadgetDrop
If EventGadget() = 1 ;wird beim drop im ExplorerList 1 ausgeführt
Zieldatei$ = GetGadgetText(1)
Dateien.s = EventDropFiles();
Anzahl = CountString(Dateien, Chr(10)) + 1;
Debug Zieldatei$
For i = 1 To Anzahl
Debug StringField(Dateien, i, Chr(10))
Next
EndIf
If EventGadget() = 2 ;wird beim drop im ExplorerList 2 ausgeführt
Zieldatei$ = GetGadgetText(2)
Dateien.s = EventDropFiles();
Anzahl = CountString(Dateien, Chr(10)) + 1;
Debug Zieldatei$
For i = 1 To Anzahl
Debug StringField(Dateien, i, Chr(10))
Next
EndIf
EndIf
Until event = #PB_Event_CloseWindow
EndIf