method G2antt.ShowToolTip (ToolTip as String, [Title as Variant], [Alignment as Variant], [X as Variant], [Y as Variant])
Shows the specified tooltip at given position.

TypeDescription
ToolTip as String A String expression that indicates the description of the tooltip, that supports built-in HTML format.
Title as Variant If present, A String expression that indicates the title of the tooltip.
Alignment as Variant A long expression that indicates the alignment of the tooltip relative to the position of the cursor. If missing, the tooltip is aligned to the left/top corder. 
X as Variant A single that specifies the current X location of the mouse pointer. The x values is always expressed in screen coordinates. If missing or -1, the current mouse X position is used.  A string expression that indicates the offset to move the tooltip window relative to the cursor position.
Y as Variant A single that specifies the current Y location of the mouse pointer. The y values is always expressed in screen coordinates. If missing or -1, the current mouse Y position is used. A string expression that indicates the offset to move the tooltip window relative to the cursor position.
Use the ShowToolTip method to display a custom tooltip. Use the ToolTipPopDelay property specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control. Use the ToolTipFont property to change the tooltip's font. Use the Background(exToolTipAppearance) property indicates the visual appearance of the borders of the tooltips. Use the Background(exToolTipBackColor) property indicates the tooltip's background color. Use the Background(exToolTipForeColor) property indicates the tooltip's foreground color. The ShowToolTip method has no effect if  the ToolTip and Title parameters are empty. Use the CellToolTip property to specify the cell's tooltip. Use the ItemBar(,,exBarToolTip) property to specify a tooltip for a bar. Use the Link(,exLinkToolTip) property to specify the tooltip to be shown when the cursor hovers the link.

The ToolTip parameter supports the built-in HTML format like follows:

Also, newer HTML format supports decorative text like follows:

The Alignment parameter can be one of the followings:

Use  numeric values as strings for X and Y parameters, to move the tooltip window relative to the position of the cursor. For instance, ShowToolTp("text",,,"11","12"), means that the tooltip window is moved 11 pixels on the X axis, and 12 pixels on the Y axis, before showing it in the default position. In this case the X and Y parameters MUST be passed as strings not as LONG values.

The following VB sample displays ( as tooltip ) the identifier of the anchor element from the cursor:

Private Sub G2antt1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With G2antt1
        .ShowToolTip .AnchorFromPoint(-1, -1)
    End With
End Sub

The following VB.NET sample displays ( as tooltip ) the identifier of the anchor element from the cursor:

Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
    With AxG2antt1
        .ShowToolTip(.get_AnchorFromPoint(-1, -1))
    End With
End Sub

The following C# sample displays ( as tooltip ) the identifier of the anchor element from the cursor:

private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e)
{
    axG2antt1.ShowToolTip(axG2antt1.get_AnchorFromPoint(-1, -1));
}

The following C++ sample displays ( as tooltip ) the identifier of the anchor element from the cursor:

void OnMouseMoveG2antt1(short Button, short Shift, long X, long Y) 
{
	COleVariant vtEmpty; V_VT( &vtEmpty ) = VT_ERROR;
	m_g2antt.ShowToolTip( m_g2antt.GetAnchorFromPoint( -1, -1 ), vtEmpty, vtEmpty, vtEmpty );
}

The following VFP sample displays ( as tooltip ) the identifier of the anchor element from the cursor:

*** ActiveX Control Event ***
LPARAMETERS button, shift, x, y

with thisform
    With .G2antt1
        .ShowToolTip(.AnchorFromPoint(-1, -1))
    EndWith
endwith