Hope this is what you are looking for:

 if (Application.MessageBox('Welcome to my Delphi application. Exit now?',
                            'Information',
                            MB_YESNO + MB_DEFBUTTON2) = IDYES) then
  Begin
   MessageDlg('Exiting the Delphi application.',
              mtInformation,
              [mbOk], 0);
   Close;
  end;



Regards
N.G van der Westhuizen
www.slx.za.net



--- In [email protected], Andries Bos <[EMAIL PROTECTED]> wrote:
>
> I would like to set a default button within a messagebos. Within the
delphi help example this is possible, but searchin within the dialogs
unit, the messagedlg is not overloaded, and the last paarmeter would
not be allowed.
> 
> 
> 
>  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;
> 
> Am i missing something or is this implemented in another unit?
> 
> regards
> 
> andries
> 
>  
> ---------------------------------
> Sponsored Link
> 
> Mortgage rates as low as 4.625% - $150,000 loan for $579 a month.
Intro-*Terms
> 
> [Non-text portions of this message have been removed]
>

Reply via email to