Autor Beitrag
tommythe1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 6 Personal
BeitragVerfasst: Do 09.11.06 12:53 
Hallo!

Mein Programm läd ca. 120 Bilder beim Start als Image ein.

ausblenden Delphi-Quelltext
1:
  imgInfo.Picture.LoadFromFile('Daten\Bilder\bild'+IntToStr(b)+'.emf');					


Die Bilder liegen im selben Verzeichnis wie die exe, im Ordner Daten\Bilder\.

Nun soll das Programm über das Intranet laufen. Doch hier läd es kein bild ein, obwohl die exe mit den Daten im selben Ordner auf dem Server liegt!

Kann mir jemand helfen??
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Do 09.11.06 13:00 
versuch mal
ausblenden Delphi-Quelltext
1:
imgInfo.Picture.LoadFromFile(extractFilePath(ParamStr[0])+'Daten\Bilder\bild'+IntToStr(b)+'.emf');					

zur Erklärung :
extractFilePath(ParamStr[0]) ermittelt den aktuellen Pfad der Anwendung
tommythe1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 6 Personal
BeitragVerfasst: Do 09.11.06 13:15 
user profile iconazubi_20 hat folgendes geschrieben:
versuch mal
ausblenden Delphi-Quelltext
1:
imgInfo.Picture.LoadFromFile(extractFilePath(ParamStr[0])+'Daten\Bilder\bild'+IntToStr(b)+'.emf');					

zur Erklärung :
extractFilePath(ParamStr[0]) ermittelt den aktuellen Pfad der Anwendung


kommt der Fehler: "nicht genügend wirkliche Parameter"
vor der 0 in eckigen klammern sitzt der Cursor bei der Fehlermeldung
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Do 09.11.06 13:19 
sorry, muss so heißen :
ausblenden Delphi-Quelltext
1:
extractFilePath(ParamStr(0))					

(runde statt eckige Klammern)
tommythe1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 6 Personal
BeitragVerfasst: Do 09.11.06 13:48 
user profile iconazubi_20 hat folgendes geschrieben:
sorry, muss so heißen :
ausblenden Delphi-Quelltext
1:
extractFilePath(ParamStr(0))					

(runde statt eckige Klammern)



ja danke, hab schon in der hilfe nachgeschaut und den fehler bemerkt

jetzt test ichs mal obs im Intranet läuft
tommythe1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 6 Personal
BeitragVerfasst: Do 09.11.06 14:19 
nein es läuft trotzdem nicht
DaKirsche
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

Win XP Pro, SuSe Linux 7.3 - 10.2, Win 2k3 Server, Win 2000, Win NT 4.0
Delphi 2006 Pro, Java, HTML, SQL, PHP, CSS
BeitragVerfasst: Do 09.11.06 15:21 
Dann lasse dir doch mal den String von ExtractFilePath(ParamStr(0)); anzeigen.

Denke mal, dass er dir dabei den Serverpfad gibt, also "C:\...²..

Ansonsten versuche es mal folgendermaßen:

Setze eine Serverfreigabe auf den Ordner, wobei "Jeder" Lese- und Ausführrechte hat.
Dann gibst du im Programm den Pfad an:

ausblenden Delphi-Quelltext
1:
Image1.Picture.LoadFromFile('\\Servername\Freigabename\Bildname.JPG');					


Aber am Besten du schickst mal den Output, den du bekommst, wenn du an einem Client folgendes ausführst:

ausblenden Delphi-Quelltext
1:
ShowMessage(ExtractFilePath(ParamStr(0)));