Skip to main content
All docs
V26.1
  • dxShowMessagePos(string,Integer,Integer,TdxMessageDialogHyperlinkClickDelegate,TdxMessageDialogShowHyperlinkHintDelegate,TdxMessageDialogHintedTextClickDelegate,TdxMessageDialogShowTextHintDelegate) Method

    Opens a generic message dialog box at a specified position on the screen.

    Declaration

    procedure dxShowMessagePos(const AMessage: string; X: Integer; Y: Integer; const AHyperlinkClickProc: TdxMessageDialogHyperlinkClickDelegate = nil; const AShowHyperlinkHintProc: TdxMessageDialogShowHyperlinkHintDelegate = nil; const AHintedTextClickProc: TdxMessageDialogHintedTextClickDelegate = nil; const AShowTextHintProc: TdxMessageDialogShowTextHintDelegate = nil);

    Parameters

    Name Type Description
    AMessage string

    Message dialog box content. The AMessage parameter value initializes the created form’s Message property.

    The AMessage parameter supports a set of BBCode-inspired tags that allow you to format message box content.

    X Integer

    A horizontal offset (in pixels) of the upper-left dialog corner from the upper-left screen corner.

    Y Integer

    A vertical offset (in pixels) of the upper-left dialog corner from the upper-left screen corner.

    AHyperlinkClickProc TdxMessageDialogHyperlinkClickDelegate

    Optional. A procedure that handles clicks on hyperlinks in the displayed message. For example, use this procedure to identify the clicked hyperlink and prevent specific links from being activated.

    This parameter value initializes the HyperlinkClickProc property of the created message dialog box form.

    Refer to the procedural type description for detailed information and a code example: TdxMessageDialogHyperlinkClickDelegate.

    AShowHyperlinkHintProc TdxMessageDialogShowHyperlinkHintDelegate

    Optional. A procedure that handles hyperlink hint display events. For example, use this procedure to modify the predefined hint message (the hyperlink target URI) based on conditions in your application.

    This parameter value initializes the ShowHyperlinkHintProc property of the created message dialog box form.

    Refer to the procedural type description for detailed information and a code example: TdxMessageDialogShowHyperlinkHintDelegate

    AHintedTextClickProc TdxMessageDialogHintedTextClickDelegate

    Optional. A procedure that handles clicks on hint-marked text ranges in the displayed message. For example, use this procedure to identify the clicked text range.

    This parameter value initializes the HintedTextClickProc property of the created message dialog box form.

    Refer to the procedural type description for detailed information and a code example: TdxMessageDialogHintedTextClickDelegate.

    AShowTextHintProc TdxMessageDialogShowTextHintDelegate

    Optional. A procedure that handles hint display events for hint-marked text ranges enclosed between [HINT] and [\HINT] tags. For example, use this procedure to modify the hint message based on conditions in your application.

    This parameter value initializes the ShowTextHintProc property of the created message dialog box form.

    Refer to the procedural type description for detailed information and a code example: TdxMessageDialogShowTextHintDelegate.

    Remarks

    Call the dxShowMessagePos procedure to display a generic message dialog box at a specified position on the screen. The created message dialog box has a specified formatted message and uses the Application.Title value as the title.

    VCL Editors Library: A Generic Message Box with a Formatted Message,

    Code Example: Display a Message Dialog at the Mouse Pointer Position

    The following code example displays a generic message dialog box at the mouse pointer position:

    uses
      dxMessageDialog, // Declares the dxShowMessagePos method
      Winapi.Windows;  // Declares WinAPI constants
    // ...
    
    procedure TMyForm.DemonstrateDxShowMessagePos1;
    var
      AHelpURL, AMessage, ATitleURL: string;
      APointer: TPoint;
    begin
      // Define a formatted message with hyperlinks (using the BBCode-inspired markup)
      AHelpURL := 'https://docs.devexpress.com/VCL/dxMessageDialog.dxShowMessagePos(AD86C527)';
      ATitleURL := 'https://docwiki.embarcadero.com/Libraries/en/Vcl.Forms.TApplication.Title';
      AMessage := 
        '[URL=' + AHelpURL + ']dxShowMessagePos[/URL] ' +
        'displays a generic message dialog box at specific screen coordinates.' +
        sLineBreak + sLineBreak +
        'The message box has a formatted message ([B]AMessage[/B]) and an [B]OK[/B] button, ' +
        ' and uses the [URL=' + ATitleURL + ']Application.Title[/URL] value as the title.';
    
      APointer := Mouse.CursorPos; // Obtains mouse pointer coordinates
      // Display a message box at the mouse pointer position
      dxShowMessagePos(AMessage, APointer.X, APointer.Y);
      end;
    

    VCL Editors Library: A Generic Message Box with a Formatted Message,

    See Also