procedure messageboxs(message1,capti
var
fl: Longint;
begin
//case dosn't work with strings
if SameText(icon, '1') then
begin
fl := MB_ICONEXCLAMATION;
end;
else if SameText(icon, '2') then
begin
fl := MB_ICONSTOP;
end
else if SameText(icon, '3') then
begin
fl := MB_ICONQUESTION;
end
else if SameText(icon, '4') then
begin
fl := MB_ICONINFORMATION;
end;
MessageBox(0, PChar(message1), PChar(caption), MB_OK or fl);
end;
or I didn't understand question...
Main Topics
Browse All Topics





by: DaFoxPosted on 2003-01-13 at 14:17:55ID: 7720836
Hi robert200.
: TObject);
I don't get the sense of this, but maybe this helps you to solve your problem:
procedure myMessageBox(myMessage, myCaption: String; myIcon: DWord);
begin
MessageBox(0, PChar(myMessage), PChar(myCaption), myIcon);
end;
procedure TForm1.Button1Click(Sender
begin
myMessageBox('This is my message', 'This is my caption', MB_OK or MB_ICONINFORMATION);
end;
Did I misunderstand something?
Markus