What input and output functions are used in Delphi window mode?

  • one
    What is the "window mode"? This is a common window program and you are interested in how to enter into a window (form) and display something on the same window? So what? - DelphiM0ZG
  • one
    +1 So I do not understand the question. Delphi is originally a windowing development environment for window applications, well, you can of course not window, but the question is not this. - Artem
  • one
    Is it possible, in more detail? - Micah Nikolaev

2 answers 2

The MessageDlg function is used to display messages to the user. These messages may be informational, warning, or whatever. There is a complete free selection of buttons that the user can click to confirm the dialog.

mtWarning - Displays an exclamation symbol

mtError - Displays a red "X"

mtInformation - Displays "i" in a circle

mtConfirmation - Displays a question mark

mtCustom - Displays only the message.

The Buttons value can be one of the following listed values:

mbYes - Displays the "Yes" button

mbNo - Displays the "No" button

mbOK - Displays the "OK" button

mbCancel - Displays the "Cancel" button

mbAbort - Displays the "Abort" button

mbRetry - Displays the "Retry" button

mbIgnore - Displays the "Ignore" button

mbAll - Displays the "All" button

mbNoToAll - Displays the "No to all" button

mbYesToAll - Displays the "Yes to all" button

mbHelp - Displays the "Help" button

Example code: Showing confirmation dialog

var buttonSelected : Integer; begin // ΠžΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΈΠ°Π»ΠΎΠ³Π° с ΠΏΠΎΠ΄Ρ‚Π²Π΅Ρ€ΠΆΠ΄Π΅Π½ΠΈΠ΅ΠΌ buttonSelected := MessageDlg('Confirmation',mtError, mbOKCancel, 0); // Показ Ρ‚ΠΈΠΏΠ° Π²Ρ‹Π±Ρ€Π°Π½Π½ΠΎΠΉ ΠΊΠ½ΠΎΠΏΠΊΠΈ if buttonSelected = mrOK then ShowMessage('Π‘Ρ‹Π»Π° Π½Π°ΠΆΠ°Ρ‚Π° OK'); if buttonSelected = mrCancel then ShowMessage('Π‘Ρ‹Π»Π° Π½Π°ΠΆΠ°Ρ‚Π° Cancel'); end; 

    Show Message and MSG DLG OTHER