Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Problem mit Application.MessageBox (https://www.delphipraxis.net/57378-problem-mit-application-messagebox.html)

robinWie 20. Nov 2005 11:27


Problem mit Application.MessageBox
 
Hallo,

ich will dass wenn ich eine Datei lösche und das nicht geht (z.B durch Schreibschutz) mit einer MessageBox eine Fehlermedlung ausgegeben wird in der Steht "Konnte Datei "<Dateiname>" nicht löschen".

Delphi-Quellcode:
Application.MessageBox('Die Datei "'+PAnsiChar(s)+'" konnte nicht gelöscht werden!',
        'Fehler',
        mb_Ok + mb_IconError);
s beschreibt den Dateiname und ist ein String. Da die MessageBox aber nur PAnsiChar unterstützt habe ich versucht den String mit PAnisChar(s) zu konvertieren, funzt aber nicht :cry:

Kann mir jemand Helfen :?:

Matze 20. Nov 2005 11:28

Re: Problem mit Application.MessageBox
 
Hi,

ungestetst, aber versuch's mal so:

Delphi-Quellcode:
Application.MessageBox(PAnsiChar('Die Datei "' + s + '" konnte nicht gelöscht werden!'),
        'Fehler', MB_OK + MB_IconError);

robinWie 20. Nov 2005 11:33

Re: Problem mit Application.MessageBox
 
Funzt, danke für deine High-Speed-Antwort!


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:22 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz