Autor Beitrag
tschinkes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Mi 23.02.05 17:27 
Hallo zusammen,
habe ein kleines Prg geschrieben das *.nfo Dateien lesen kann, funktioniert alles gut, bis auf eine Sache. Hab mein kleines Tool im Explorer unter Dateitypen für *.nfo Files registriert, aber wenn ich nun auf eine *.nfo Datei doppelklicke, öffnet sich das Tool, aber das memofeld ist leer. Muss ich da auch was proggen????
TimonWorld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 397



BeitragVerfasst: Mi 23.02.05 17:39 
Dein Programm weiß ja dann farnicht, wo die Datei ist. Bei OnShow musst du die Datei erstmal einlesen von Paramstr(1).

Nutz' aber auch mal die Suche: Suche in: Delphi-Forum, Delphi-Library PARAMSTR(1)

edit: Suchebegriff geändert
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 23.02.05 17:54 
benutze aber zuerst paramcount um zu sehen ob überhaupt parameter übergeben wurde...

also if paramcount > 0 then openfile(paramstr(1));
tschinkes Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Do 24.02.05 16:34 
Danke :arrow: TimonWorld für den Tip, hat gefunzt :-)))!!!!

Konnte gestern blos nicht mehr Antworten.

Und an regnyt, hab ich sowie so gemacht ;)

Für alle die nicht wissen was gemeint, wenn jemand das hier liest:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.FormShow(Sender: TObject);
begin
if fileexists(ParamStr(1)) then
memo1.Lines.LoadFromFile(ParamStr(1))
else exit;
end;


Muss echt mal ein fettes Lob an das Board abgeben, echt cool 8) !!!! Weiter so!

-

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
TimonWorld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 397



BeitragVerfasst: Do 24.02.05 17:17 
Hallo tschinkes!

Super, dass es jetzt klappt!

Das wusste ich aber auch nur daher, weil ich mal die Frage hier selber geschtellt habe! :wink:

Gruß,
Timon.