Mega Code Archive

 
Categories / Delphi / Examples
 

Msgbox function

Personally I find both the WinAPI MessageBox and Application.MessageBox and MessageDlg functions cludgy and always add the following function to every app. function MsgBox(const Msg: string; MsgType: Integer = MB_OK or MB_ICONSTOP): Integer; begin Result := MessageBox(Application.Handle, PChar(Msg), PChar(Application.Title), MsgType); end; requires that Forms.pas is in the uses clause.