[lazarus] An example for MessageBox

Mattias Gaertner nc-gaertnma at netcologne.de
Wed May 8 13:34:58 EDT 2002

On Wed, 08 May 2002 17:56:09 GMT
NORBERT ALLAIN <norbert.allain at wanadoo.fr> wrote:

> I don't understand how to use the MessageBox procedure.
> An example please.

The Application.MessageBox exists only for Delphi compatibility. It just calls MessageDlg, which has some more features.

For example:
Add Dialogs to your uses section.

procedure TForm1.Button1CLICK(Sender: TObject);
  if MessageDlg('Caption','Text',mtInformation,[mbOk,mbCancel],0)=mrOk then
    Application.MessageBox('You pressed ok','Caption',MB_OK);


More information about the Lazarus mailing list