Autor Beitrag
Andreas_Sans
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Fr 28.11.03 16:12 
Ich will eine Messagebox machen in der die erreichte Punktzahl und die Zeit ausgegeben werden sollen. Wenn ich es aber so versuche :

ausblenden Delphi-Quelltext
1:
application.messagebox('Glückwunsch Sie haben gewonnen. Dabei haben sie in '+inttostr(zeit)+' Sekunden '+inttostr(punkte)+' Punkte erzielt','Gewonnen',mb_ok);					


dann schreibt Delphi : Inkompatible Typen : 'String' und 'PChar'

Kann mir jemand helfen ?
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Fr 28.11.03 16:14 
mit pchar('text') kannst du einen string in einen pchar umwandeln.
G-man
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 258

Win 2000, Win ME, SuSE 8.2
D5 Standard, D6 Professional
BeitragVerfasst: Sa 29.11.03 10:37 
Sieht dann also so aus: application.messagebox(PChar('Glückwunsch Sie haben gewonnen. Dabei haben sie in '+inttostr(zeit)+' Sekunden '+inttostr(punkte)+' Punkte erzielt'), PChar('Gewonnen'), mb_ok);

_________________
...To err is human, but to really foul things up requires a computer.