Buttons used in Message Dialog

A message dialog can be written to ask a question yet ignore the result or only have one button yet check the result.

This statement asks the user the question but ignores the result:

MessageDlg(‘Are you sure ?’, mtConfirmation, [mbYes,mbNo], 0);

It should probably read as this:

If MessageDlg(‘Are you sure ?’, mtConfirmation, [mbYes,mbNo], 0)=mrNo then exit;




< Back to list of hints and warnings