DelphiBasics
ShowMessagePos
Procedure
Display a string in a simple dialog at a given screen position Dialogs unit
 procedure ShowMessagePos(const Text string; const XPos, YPos Integer);
Description
The ShowMessagePos procedure displays a string of Text in a simple dialog with an OK button at the given XPos, YPos screen coordinates.
 
The dialog is positioned with its top left at the given screen pixel coordinates.
 
This dialog 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
ShowMessageDisplay a string in a simple dialog with an OK button
ShowMessageFmtDisplay formatted data in a simple dialog with an OK button
 Download this web site as a Windows program.




 
Example code : Show the message dialog at default and selected screen coordinates
begin
  // Show a simple message at the default coordinates
  ShowMessage('Hello World');

  // Show a simple message at screen position 100, 200
  ShowMessagePos('Hello World', 100, 200);
end;
Show full unit code
  The following is displayed at the screen centre:
  
  Hello World
  
  The following is displayed at position 100,200:
  
  Hello World
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page