Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

MessageBox_Sample

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

:envelope: Message Box Sample


📝information taken from the website "functionx"

Flag List

txt

  MB_OK
  MB_OKCANCEL
  MB_ABORTRETRYIGNORE
  MB_YESNOCANCEL
  MB_YESNO
  MB_RETRYCANCEL
  MB_HELP

Icon List

txt

  MB_ICONEXCLAMATION    //Alert
  MB_ICONWARNING        //Alert
  MB_ICONINFORMATION    //Info
  MB_ICONASTERISK       //Info
  MB_ICONQUESTION       //Question
  MB_ICONSTOP           //Question
  MB_ICONERROR          //Error
  MB_ICONHAND           //Error

Default Button on MessageBox

txt

  MB_DEFBUTTON1 //first button
  MB_DEFBUTTON2 //second button
  MB_DEFBUTTON3 //third button
  MB_DEFBUTTON4 //fourth button

The Returned Value of the Message Box

txt

 IDOK          //Ok Button
  IDCANCEL      //Cancel Button
  IDABORT       //Abort Button
  IDRETRY       //Retry Button
  IDIGNORE      //Ignore Button
  IDYES         //Yes Button
  IDNO          //No Button

Sample Use

pascal
  if  Application.MessageBox('Message Text','Caption',MB_YESNOCANCEL or MB_ICONEXCLAMATION or MB_DEFBUTTON1)  = IDYES then
  begin
    ShowMessage('You Clicked "Yes Button"!');
  end;