Autor Beitrag
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 22.10.06 12:40 
Also folgendes Problem: Ich hab ein Image. auf das soll man Datei draufziehen können und dann soll mir der Pfad der Datei ausgegeben werden! wie kann ich das schaffen?? suche hat mir auch nicht sehr geholfen!

mfg el


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am So 22.10.2006 um 13:47

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 22.10.06 12:50 
Das hier sollte dein Problem lösen.

_________________
We are, we were and will not be.
TuringTracer
Hält's aus hier
Beiträge: 12



BeitragVerfasst: So 22.10.06 13:06 
Also mir hat die Suche geholfen... (bis jetzt fast immer...)

:les: Gucks du : Bild per Drag & Drop öffnen
Ein weiterer Artikel von user profile iconGausi - gab also schon mehrere Fragen in diese Richtung...
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 22.10.06 13:08 
ok danke!!

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 23.10.06 11:22 
ok mein problem hat sich noch nicht wirklich gelöst. leider!

ich hab den code so umgeformt:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
Procedure TForm1.WMDropFiles (Var aMsg: tMessage); 
Var Idx, Size, FileCount: Integer; 
    Filename: pChar; 
Begin 
  Inherited; 
  FileCount := DragQueryFile (aMsg.WParam, $FFFFFFFF, nil, 255); 
  For Idx := 0 To FileCount -1 Do 
    Begin 
      Size := DragQueryFile (aMsg.WParam, Idx, nil, 0) + 1; 
      Filename := StrAlloc (Size); 
      If DragQueryFile (aMsg.WParam, Idx, Filename, Size) = 1 Then 
        { nothing } ; 
      if strg_gedrueckt then          //boolean ob man strg gedrückt hat beim loslassen
        movefile(Filename,PChar(Laufwerk) // Laufwerk wird im onMouseMove des Image festgelegt
      else begin
        movefile(Filename,PChar(Laufwerk);
        deletefile(filename);
      end;
    End; 
  DragFinish (aMsg.WParam); 
End;

procedure Tform1.Image1OnMouseMove(Sender: TObject; X,Y: Integer);
begin
  Laufwerk:='C:\';
end;


wenn ich jetzt eine Datei von der Festplatte auf das Image ziehe dann wird die Datei nicht auf die Festplatte kopiert/verschoben!

fehlt da was oder hab ich nen fehler?

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mi 25.10.06 08:53 
will mir denn niemand helfen??? :bawling:

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 25.10.06 09:00 
Bin mir nicht sicher, aber muss man als Ziel nicht den Zieldateinamen angeben? Und nicht nur das Zielverzeichnis? Also nicht movefile(Filename,PChar(Laufwerk); sondern
movefile(Filename,PChar(Laufwerk + ExtractFilename(Filename)); oder so ähnlich. Wahrscheinlich ist da jetzt ein '\' zuviel oder zuwenig...

_________________
We are, we were and will not be.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 26.10.06 11:20 
:autsch: ich depp! das wusste ich schon mal alles!!

danke schön!!!!!!

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Sa 28.10.06 08:59 
ok! ich hab jetzt rausgefunden was falsch ist! die Variable laufwerk bekommt nichts zugewiesen. Die var wird beim onMouseMove zugewiesen aber das wird nicht aufgerufen wenn man etwas vom z.b: vom Desktop auf das image zieht. kann ich das irgendwie anders machen?

lg el

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.