What input and output functions are used in Delphi window mode?
- oneWhat 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
- oneIs it possible, in more detail? - Micah Nikolaev
2 answers
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