FAQ (exnethost)
Exontrol.COM Software - Frequently Asked Questions - ExNETHost Component
1:
The control's release notes can be found on our web site, looking for the Release Notes column in the control's main page. Click here for direct link.
2:
In MS Access, you need to use the MoveWindow API function to resize the NETHost control into a MS Access Form like in the following sample:
Private Declare Function apiMoveWindow Lib "User32" Alias "MoveWindow" _
         (ByVal hWnd As Long, ByVal X As Long, ByVal Y As Long, ByVal _
         nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) _
         As Long
         
Private Sub Command1_Click()
    With NETHost1
        .Visible = False
        apiMoveWindow .hWnd, .Top / 15, .Left / 15, 512, 512, -1
        .Visible = True
    End With
End Sub
3:
4:

The control fires the HostEvent(Ev) event as soon as the inner control fires an event. The Ev parameter of the HostEvent event holds all information about the event such as name, identifier and all its arguments. The AsString property of the Ev object (NETHostEvent type) gives a brief description of the event including its arguments such as "MouseMove[72] {Button = Left, Clicks = 0, X = 69, Y = 53, Delta = 0, Location = {X=69,Y=53}}", where MouseMove is the name of the event (Name property), 72 is the event's identifier (ID property), and arguments separated by comma between {} characters as follow: Button argument with the value "Left", Clicks argument with the value of 0, X argument with the value 69, Y parameter with the value of 53, Delta argument with the value of 0 and Location parameter as an object/structure with two fields X and Y.

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

and the output may look 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}}

For instance, let's say we need to handle the MouseMove event of the System.Windows.Forms.TreeView inner control, so we need a handler as follows:

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