Autor Beitrag
Jonathanubx
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 32



BeitragVerfasst: Fr 02.11.07 13:01 
Hi,
also ich hab folgendes Problem:

ich möchte eine TXT-Datei die sich im selben Verzeichnis (Ordner) wie die Project1.exe befindet in eben diesen Projekt öffnen. Ich kann davon ausgehen, dass diese beiden Dateien IMMER im gleichen Ordner sind.
Gibt es da eine Möglichkeit, per button click diese Datei im Editor anzeigen zu lassen?
wäre nett wenn es eine möglichst simple Methode gäbe.

ich habe win xp und delphi 7

Danke schon mal im Voraus!
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 02.11.07 13:04 
Schau Dir mal ExtractFilePath und LoadFromFile an.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Agawain
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 460

win xp
D5, MySQL, devxpress
BeitragVerfasst: Fr 02.11.07 13:22 
hallo

wenn Du den Notepad Editor meinst, dann
fügst Du einfach shellapi in uses ein und im Buttonclick

ausblenden Delphi-Quelltext
1:
 ShellExecute(Handle, pchar('open'), pchar('Artikel.txt'), nil, PChar('CurrentDir'), SW_NORMAL);					

_________________
Gruß Aga
Jonathanubx Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 32



BeitragVerfasst: So 04.11.07 15:31 
perfekt, genau sowas habe ich gesucht.

allerdings gibt es noch ein kleines problem und zwar finde ich diese shellapi leider nicht und auch in der hilfe-suche findet sich nichts. (ich hab die deutsche version, falls das irgendwas ausmacht)
gehstock
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19
Erhaltene Danke: 2



BeitragVerfasst: So 04.11.07 15:36 
Du schreibst oben in die Uses klausel einfach noch Shellapi dazu (mit komma natürlich)

aus

ausblenden Delphi-Quelltext
1:
2:
3:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Menus;


wird einfach
ausblenden Delphi-Quelltext
1:
2:
3:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Menus, ShellApi;
Jonathanubx Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 32



BeitragVerfasst: So 04.11.07 15:52 
danke leute, ihr seid echt genial :D *THUMBS UP*