Type | Description | |||
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in client coordinates. | |||
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in client coordinates. | |||
Panel | A Panel object that specifies the panel from the cursor or nothing if no panel at the cursor. |
The following VB sample displays the caption from the cursor:
Private Sub StatusBar1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim p As EXSTATUSBARLibCtl.Panel With StatusBar1 Set p = .PanelFromPoint(-1, -1) If (Not p Is Nothing) Then Debug.Print p.Text End If End With End Sub
The following VB.NET sample displays the caption from the cursor:
Private Sub AxStatusBar1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXSTATUSBARLib._IStatusBarEvents_MouseMoveEvent) Handles AxStatusBar1.MouseMoveEvent Dim p As EXSTATUSBARLib.Panel With AxStatusBar1 p = .get_PanelFromPoint(-1, -1) If (Not p Is Nothing) Then Debug.Print(p.Text) End If End With End Sub
The following C# sample displays the caption from the cursor:
private void axStatusBar1_MouseMoveEvent(object sender, AxEXSTATUSBARLib._IStatusBarEvents_MouseMoveEvent e) { EXSTATUSBARLib.Panel p = axStatusBar1.get_PanelFromPoint(-1, -1); if (p != null) System.Diagnostics.Debug.WriteLine(p.Text); }
The following C++ sample displays the caption from the cursor:
void OnMouseMoveStatusbar1(short Button, short Shift, long X, long Y) { CPanel panel = m_statusBar.GetPanelFromPoint( -1, -1 ); if ( panel.m_lpDispatch != NULL ) OutputDebugString( panel.GetText() ); }
The following VFP sample displays the caption from the cursor:
*** ActiveX Control Event *** LPARAMETERS button, shift, x, y with thisform.StatusBar1 local p p = .PanelFromPoint(-1,-1) if ( !isnull(p) ) wait window nowait p.Text endif endwith