event OleEvent (Panel as Panel, Ev as OleEvent)
Occurs when an inside ActiveX control fires an event.

TypeDescription
Panel as Panel A Panel object that hosts an ActiveX.
Ev as OleEvent An Ev object that holds information about the fired event.
The OleEvent event notifies your application when an inner ActiveX control fires an event.  Use the ToString property to display information about fired event. Use the ControlID property to insert an ActiveX control to a panel.

Syntax for OleEvent event, /NET version, on:

private void OleEvent(object sender,exontrol.EXSTATUSBARLib.Panel Panel,exontrol.EXSTATUSBARLib.OleEvent Ev)
{
}

Private Sub OleEvent(ByVal sender As System.Object,ByVal Panel As exontrol.EXSTATUSBARLib.Panel,ByVal Ev As exontrol.EXSTATUSBARLib.OleEvent) Handles OleEvent
End Sub

Syntax for OleEvent event, /COM version, on:

private void OleEvent(object sender, AxEXSTATUSBARLib._IStatusBarEvents_OleEventEvent e)
{
}

void OnOleEvent(LPDISPATCH Panel,LPDISPATCH Ev)
{
}

void __fastcall OleEvent(TObject *Sender,Exstatusbarlib_tlb::IPanel *Panel,Exstatusbarlib_tlb::IOleEvent *Ev)
{
}

procedure OleEvent(ASender: TObject; Panel : IPanel;Ev : IOleEvent);
begin
end;

procedure OleEvent(sender: System.Object; e: AxEXSTATUSBARLib._IStatusBarEvents_OleEventEvent);
begin
end;

begin event OleEvent(oleobject Panel,oleobject Ev)
end event OleEvent

Private Sub OleEvent(ByVal sender As System.Object, ByVal e As AxEXSTATUSBARLib._IStatusBarEvents_OleEventEvent) Handles OleEvent
End Sub

Private Sub OleEvent(ByVal Panel As EXSTATUSBARLibCtl.IPanel,ByVal Ev As EXSTATUSBARLibCtl.IOleEvent)
End Sub

Private Sub OleEvent(ByVal Panel As Object,ByVal Ev As Object)
End Sub

LPARAMETERS Panel,Ev

PROCEDURE OnOleEvent(oStatusBar,Panel,Ev)
RETURN

Syntax for OleEvent event, /COM version (others), on:

<SCRIPT EVENT="OleEvent(Panel,Ev)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function OleEvent(Panel,Ev)
End Function
</SCRIPT>

Procedure OnComOleEvent Variant llPanel Variant llEv
	Forward Send OnComOleEvent llPanel llEv
End_Procedure

METHOD OCX_OleEvent(Panel,Ev) CLASS MainDialog
RETURN NIL

void onEvent_OleEvent(COM _Panel,COM _Ev)
{
}

function OleEvent as v (Panel as OLE::Exontrol.StatusBar.1::IPanel,Ev as OLE::Exontrol.StatusBar.1::IOleEvent)
end function

function nativeObject_OleEvent(Panel,Ev)
return

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