Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi MessageBox (https://www.delphipraxis.net/76129-messagebox.html)

DJAYS 30. Aug 2006 12:14


MessageBox
 
hallo,
brauche dringend Hilfe wenn möglich.ich folgendes mit Application.MesssageBox realisieren,aber klappt es nicht.könnte jemand mir bitte den entsprechenden schreiben?[

Code:
Result := MessageDlg(sTestCmd + #13 + 'bei Testpunkt : '+ IntToStr(iTestCmd)+'->' + sTestItem,mtError,[mbRetry,mbAbort],0);
sTestCmd,sTestItem sind String

so habe ich versuch aber Fehler inkompatible String und PChar
Code:
Result := if Application.MessageBox('sTesCmd' + #13 + 'bei Testpunkt : '+ IntToStr(iTestCmd)+'->' + sTestItem,Fehler,21);
und
Code:
if MessageDlg(sMsgStr1+#13+sMsgStr2+#13+sMsgStr3+#13+sMsgStr4,mtConfirmation,[mbYes, mbNo],0)=mrYes then begin
                         // ADC-Wrte übernehmen
                            iErr := UCBTestBoard.WriteAdcAdjustValues(stAdcAdjVal);
                            iErrHdl := ErrorHandler(iErr,iTestCmd,1);
sMsgStr1...4 sind alle Zahlen
][code]

danke

Zacherl 30. Aug 2006 12:22

Re: MessageBox
 
Du musst den ganzen String hinterher nach PChar typecasten. Also:
Delphi-Quellcode:
Application.MessageBox(PChar('ttst' + MyVar), 'Info', 64);
Florian

DJAYS 30. Aug 2006 13:57

Re: MessageBox
 
hallo,
danke man


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

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