property OleEvent.CountParam as Long

Retrieves the count of the OLE event's arguments.

TypeDescription
Long A long value that indicates the count of the arguments.

The CountParam property specifies the number of parameters in the event. Use the ToString property to display information about fired event. 

The following VB sample enumerates the arguments of an OLE event when OLEEvent is fired.

Private Sub StatusBar1_OleEvent(ByVal Panel As EXSTATUSBARLibCtl.IPanel, ByVal Ev As EXSTATUSBARLibCtl.IOleEvent)
    Debug.Print Ev.ToString()
End Sub

The following VC sample displays the events that an ActiveX control is firing while it is hosted by an item:

#import "C:\\WINNT\\SYSTEM32\\ExStatusBar.dll"
using namespace EXSTATUSBARLib;

void OnOleEventStatusbar1(LPDISPATCH Panel, LPDISPATCH Ev) 
{
	EXSTATUSBARLib::IOleEventPtr spEvent( Ev );
	OutputDebugString( spEvent->ToString );
}

The #import clause is required to get the wrapper classes for IOleEvent and IOleEventParam objects, that are not defined by the MFC class wizard. The same #import statement defines the EXSTATUSBARLib namespace that include all objects and types of the control's TypeLibrary. In case your exstatusbar.dll library is located to another place than the system folder or well known path, the path to the library should be provided, in order to let the VC finds the type library.  

The following VB.NET sample displays the events that an ActiveX control is firing while it is hosted by an item:

Private Sub AxStatusBar1_OleEvent(ByVal sender As System.Object, ByVal e As AxEXSTATUSBARLib._IStatusBarEvents_OleEventEvent) Handles AxStatusBar1.OleEvent
    Debug.Print(e.ev.ToString)
End Sub

The following C# sample displays the events that an ActiveX control is firing while it is hosted by an item:

private void axStatusBar1_OleEvent(object sender, AxEXSTATUSBARLib._IStatusBarEvents_OleEventEvent e)
{
    System.Diagnostics.Debug.Print(e.ev.ToString);
}

The following VFP sample displays the events that an ActiveX control fires when it is hosted by an item:

*** ActiveX Control Event ***
LPARAMETERS panel, ev

wait window nowait ev.ToString