Message DLG in Delphi (Function)
Message DLG in Delphi (Function)
TMsgDlgType defines values describing the type of message box. Delphi syntax: type TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom); Description The TMsgDlgType type defines the values describing the type of a message box. The TMsgDlgType is used by the MessageDlg and MessageDlgPos functions. The following table lists the possible values: mtWarning mtError mtInformation mtConfirmation mtCustom A message box containing a yellow exclamation point symbol. A message box containing a red stop sign. A message box containing a blue "i". A message box containing a green question mark. A message box containing no bitmap. The caption of the message box is the name of the application's executable file.
TMsgDlgButtons defines a set of values used by MessageDlg and MessageDlgPos. Delphi syntax: TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp); TMsgDlgButtons = set of TMsgDlgBtn; const mbYesNoCancel = [mbYes, mbNo, mbCancel]; mbYesAllNoAllCancel = [mbYes, mbYesToAll, mbNo, mbNoToAll, mbCancel]; mbOKCancel = [mbOK, mbCancel]; mbAbortRetryIgnore = [mbAbort, mbRetry, mbIgnore]; mbAbortIgnore = [mbAbort, mbIgnore]; Description The TMsgDlgButtons type defines the set of values a button in a message box can have. The TMsgDlgButtons type is used by the MessageDlg and MessageDlgPos functions. The following tables lists the possible values: mbYes mbNo mbOK mbCancel mbAbort mbRetry mbIgnore mbAll mbNoToAll mbYesToAll mbHelp A button with 'Yes' on its face. A button the text 'No' on its face. A button the text 'OK' on its face. A button with the text 'Cancel' on its face. A button with the text 'Abort' on its face A button with the text 'Retry' on its face A button the text 'Ignore' on its face A button with the text 'All' on its face A button with the text 'No to All' on its face A button with the text 'Yes to All' on its face A button with the text 'Help' on its face
Procedure TForm1.Button1Click(Sender: TObject); Begin If MessageDlg('Ki akarsz lpni?',mtConfirmation,[mbYes,mbNo],0)=mrYes then Close; End;