method NETHostCtrlEvents.HostEvent (Ev as NETHostEvent)
The hosting control fires an event.

TypeDescription
Ev as NETHostEvent A NETHostEvent object that holds information about the firing event.
The trial/evaluation version of the control limits firing this event. In other words, using the trial/evaluation version won't fire the event every time it should.

The HostEvent event notifies your application once the hosting control ( Host ) fires an event. The HostEvents property of the NETHost control specifies the list of events that the control should handle. The AsString property of the NETHostEvent object gives a brief description of the event that occurred including the event's name, identifier and its list of arguments. Each control that the NETHost host provides its own events, so for what events the hosting control supports consult its documentation. The Version property specifies the NETHost control's version, which includes the DEMO if you are running the trial version of the control.

Use the following properties to identify/filter the event:

Use the following properties to access the arguments of the event:

Syntax for HostEvent event, /NET version, on:

private void HostEvent(object sender,exontrol.exontrol_NETHost.NETHostEvent Ev)
{
}

Private Sub HostEvent(ByVal sender As System.Object,ByVal Ev As exontrol.exontrol_NETHost.NETHostEvent) Handles HostEvent
End Sub

Syntax for HostEvent event, /COM version, on:

private void HostEvent(object sender, Axexontrol_NETHost.INETHostCtrlEvents_HostEventEvent e)
{
}

void OnHostEvent(LPDISPATCH Ev)
{
}

void __fastcall HostEvent(TObject *Sender,Exontrol_nethost_tlb::INETHostEvent *Ev)
{
}

procedure HostEvent(ASender: TObject; Ev : INETHostEvent);
begin
end;

procedure HostEvent(sender: System.Object; e: Axexontrol_NETHost.INETHostCtrlEvents_HostEventEvent);
begin
end;

begin event HostEvent(oleobject Ev)
end event HostEvent

Private Sub HostEvent(ByVal sender As System.Object, ByVal e As Axexontrol_NETHost.INETHostCtrlEvents_HostEventEvent) Handles HostEvent
End Sub

Private Sub HostEvent(ByVal Ev As exontrol_NETHostCtl.INETHostEvent)
End Sub

Private Sub HostEvent(ByVal Ev As Object)
End Sub

LPARAMETERS Ev

PROCEDURE OnHostEvent(oNETHost,Ev)
RETURN

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

<SCRIPT EVENT="HostEvent(Ev)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function HostEvent(Ev)
End Function
</SCRIPT>

Procedure OnComHostEvent Variant llEv
	Forward Send OnComHostEvent llEv
End_Procedure

METHOD OCX_HostEvent(Ev) CLASS MainDialog
RETURN NIL

void onEvent_HostEvent(COM _Ev)
{
}

function HostEvent as v (Ev as OLE::Exontrol.NETHost::INETHostEvent)
end function

function nativeObject_HostEvent(Ev)
return

The following sample displays brief information about firing events:

Private Sub NETHost1_HostEvent(ByVal Ev As exontrol_NETHostCtl.INETHostEvent)
    With NETHost1
        Debug.Print Ev.AsString()
    End With
End Sub

The information you get shows as follows:

MouseMove[72] {Button = Left, Clicks = 0, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}
NodeMouseHover[15] {Node = TreeNode: Sub-Child 2.1}
Click[42] {Button = Left, Clicks = 1, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}
MouseClick[65] {Button = Left, Clicks = 1, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}
MouseUp[73] {Button = Left, Clicks = 1, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}
MouseMove[72] {Button = None, Clicks = 0, X = 69, Y = 54, Delta = 0, Location = {X=69,Y=54}}

Let's explain what data in the AsString representation means:

MouseMove[72] {Button = Left, Clicks = 0, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}

 Having this information about the event, we would know the following:

The following sample displays each argument of the MouseMove event:

Private Sub NETHost1_HostEvent(ByVal Ev As exontrol_NETHostCtl.INETHostEvent)
    With Ev
        If (.Name = "MouseMove") Then
            Debug.Print .Arguments.Item("Button").AsInt
            Debug.Print .Arguments.Item("Clicks").AsInt
            Debug.Print .Arguments.Item("X").AsInt
            Debug.Print .Arguments.Item("Y").AsInt
            Debug.Print .Arguments.Item("Delta").AsInt
            Debug.Print .Arguments.Item("Location.X").AsInt
            Debug.Print .Arguments.Item("Location.Y").AsInt
        End If
    End With
End Sub