DelphiBasics
ShowMessage
Procedure
Display a string in a simple dialog with an OK button Dialogs unit
 procedure ShowMessage(const Text string);
Description
The ShowMessage procedure displays a string of Text in a simple dialog with an OK button.
 
It is used to inform the user of some information - no decision is needed by the user.
 
Insert carriage return and line feed characters (#13#10) into the string to generate multi line message display.
Related commands
InputBoxDisplay a dialog that asks for user text input, with default
InputQueryDisplay a dialog that asks for user text input
MessageDlgDisplays a message, symbol, and selectable buttons
MessageDlgPosDisplays a message plus buttons at a given screen position
PromptForFileNameShows a dialog allowing the user to select a file
ShowMessageFmtDisplay formatted data in a simple dialog with an OK button
ShowMessagePosDisplay a string in a simple dialog at a given screen position
 Download this web site as a Windows program.




 
Example code : Show single and multiple line text displays
begin
  // Show a simple message
  ShowMessage('Hello World');

  // Show a blank message
  ShowMessage('');

  // Split this into two lines
  ShowMessage('Hello '+#13#10+'World');
end;
Show full unit code
  Hello World
  
  Hello
  World
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page