The following steps show you progressively how to start programming the Exontrol's ExToolTip component:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
t.ShowToolTip "This is a bit of text that's shown when the cursor hovers the form"
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
t.ShowToolTip("This is a bit of text that's shown when the cursor hovers the form")
End Sub
t.AnchorClick += new EXTOOLTIPLib._IToolTipEvents_AnchorClickEventHandler(t_AnchorClick);
void t_AnchorClick(string AnchorID, string Options)
{
System.Diagnostics.Debug.WriteLine("AnchorClick event");
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
t.ShowToolTip("This is a bit of text that's shown when the cursor hovers the form", "", "", "", "" );
}
CoInitialize( NULL );
if ( SUCCEEDED( CoCreateInstance( __uuidof(EXTOOLTIPLib::ToolTip), NULL, CLSCTX_ALL, __uuidof(EXTOOLTIPLib::IToolTip), (LPVOID*)&m_spToolTip ) ) )
{
}
BOOL PreTranslateMessage(MSG* pMsg)
{
/*
Handles the WM_MOUSEMOVE message during the PreTranslateMessage so it can show the tooltip even if we move the mouse over the inside controls too.
As the WM_MOUSEMOVE message is not sent to dialog, if the cursor hovers the inside windows...
*/
if ( pMsg->message == WM_MOUSEMOVE )
{
if ( m_spToolTip != NULL )
m_spToolTip->ShowToolTip( COleVariant( "This is a bit of text that's shown when the cursor hovers the form" ), vtMissing, vtMissing, vtMissing );
}
return CDialog::PreTranslateMessage(pMsg);
}
public t as Object
t = CreateObject("Exontrol.ToolTip")
LPARAMETERS nButton, nShift, nXCoord, nYCoord
with t
.ShowToolTip("This is a bit of text that's shown when the cursor hovers the form")
endwith
Sub window_onload
set t = CreateObject("Exontrol.ToolTip")
End Sub
Sub document_onmousemove t.ShowToolTip "This is a bit of text that's shown when the cursor hovers the form" End Sub

