Autor Beitrag
NetProg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mo 13.01.03 11:33 
Wie kann ich es machen das ich in meinem fertigen Programm einfach einen Ordner per Drag&Drop auf das Fenster ziehe und ich in einem Edit-feld den kompletten Pfad zu dem Ordner erhalte ?

Wer kann helfen, Danke schonmal vorweg ....... :roll: :roll:
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 19.01.03 12:20 
Also generell gibt es zwei Möglichkeiten, die beide funktionieren sollten.
1. Eine fremde Komponente für Drag&Drop, mit deren Hilfe du an den Pfad kommst.

Such mal bei der Url nach etwas was dir hilft.
www.torry.net/draganddrop.htm

2. Selbst schreiben einer Unit die das für dich macht.

Schau dir mal das Tutorial hier an, ich hoffe es hilft dir:
www.swissdelphicente.../showcode.php?id=493


Ich hoffe ich konnte dir helfen.

Viel Spaß

derDoc

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 21.01.03 01:04 
Oder einfach mal in unsere FAQ schauen :-) ...vom Explorer per Drag&Drop Dateien empfangen?

Gruß
TINO
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Di 29.04.03 16:21 
@Tino:

In dem o.g. Beitrag wird der Konstruktor Create des Formulars übersteuert. Es wird aber kein Inherited aufgerufen.

Nachtrag:

Ich glaube, ich habe einen weiteren Fehler entdeckt:
ausblenden Quelltext
1:
2:
3:
For Idx := 0 To FileCount -1 Do 
    Begin 
      Size := DragQueryFile (aMsg.WParam, 0, nil, 0) + 1;

Hier greifst du immer (für jedes File) die Grösse des ersten Files ab.
So müsste es sein:
ausblenden Quelltext
1:
2:
3:
For Idx := 0 To FileCount -1 Do 
    Begin 
      Size := DragQueryFile (aMsg.WParam, Idx, nil, 0) + 1;


Cu, :)
Udontknow
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 05.05.03 11:18 
Danke für den Hinweise. Hab die Änderung eingefügt!

Gruß
Tino