Ehsun
asked on
MessageDlg defualt button
How can I use from other syntaxes of MessageDlg function.
It's first syntax has 4 parameters that works proparely, but other syntaxes (overload) that have more than 4 parapeters don't work!!!
For example in the 6-parapeter that 5th parameter is for defining default button and 6th parameter is for Tbitmap don't work.!!!
this is the example of delphi help, but it doesn't work too!!!
procedure TForm1.Button1Click(Sender : TObject);
---------------
begin
if MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
begin
MessageDlg('Exiting the Delphi application.', mtInformation,
[mbOk], 0, mbOk);
Close;
end;
end;
-----------------
Please guide me! Thanks
It's first syntax has 4 parameters that works proparely, but other syntaxes (overload) that have more than 4 parapeters don't work!!!
For example in the 6-parapeter that 5th parameter is for defining default button and 6th parameter is for Tbitmap don't work.!!!
this is the example of delphi help, but it doesn't work too!!!
procedure TForm1.Button1Click(Sender
---------------
begin
if MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
begin
MessageDlg('Exiting the Delphi application.', mtInformation,
[mbOk], 0, mbOk);
Close;
end;
end;
-----------------
Please guide me! Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Add a QDialogs to uses cause to get access to MessageDlg qith 6 parameters.
What you really need is the standard VCL function Application.MessageBox, which wraps around the windows API. (You can look it up in the Delphi helpfile).
Tyrsis