property NETHostObject.AssemblyVersion as String
Indicates the version of the assembly being loaded.

TypeDescription
String A string expression that indicates the hosting control's version.
The AssemblyVersion property indicates the version of the assembly being loaded. The Version property specifies the NETHost control's version.

The following sample shows how you can get the product's version in a different way>

VBA (MS Access, Excell...)

With NETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	Debug.Print( .Host.Item("ProductVersion").Value )
End With

VB6

With NETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	Debug.Print( .Host.Item("ProductVersion").Value )
End With

VB.NET

With Exnethost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	Debug.Print( .Host.Item("ProductVersion").Value )
End With

VB.NET for /COM

With AxNETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	Debug.Print( .Host.Item("ProductVersion").Value )
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'exontrol_NETHost' for the library: 'Exontrol NETHost ActiveX Component'

	#import <exontrol.NETHost.tlb>
*/
exontrol_NETHost::INETHostCtrlPtr spNETHost1 = GetDlgItem(IDC_NETHOST1)->GetControlUnknown();
spNETHost1->PutAssemblyQualifiedName(L"System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
OutputDebugStringW( _bstr_t(spNETHost1->GetHost()->GetItem(L"ProductVersion")->GetValue()) );

C++ Builder

NETHost1->AssemblyQualifiedName = L"System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
OutputDebugString( PChar(NETHost1->Host->get_Item(L"ProductVersion")->get_Value()) );

C#

exnethost1.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
System.Diagnostics.Debug.Print( exnethost1.Host["ProductVersion"].Value.ToString() );

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:FDCBA3E0-4E2F-4DC7-B073-EAA7BD7EC565" id="NETHost1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	NETHost1.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
	alert( NETHost1.Host.Item("ProductVersion").Value );
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:FDCBA3E0-4E2F-4DC7-B073-EAA7BD7EC565" id="NETHost1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With NETHost1
		.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
		alert( .Host.Item("ProductVersion").Value )
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axNETHost1.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
System.Diagnostics.Debug.Print( axNETHost1.Host["ProductVersion"].Value.ToString() );

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	exnethost1.AssemblyQualifiedName("System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
	print( exnethost1.Host().Item("ProductVersion").Value() );
}

Delphi 8 (.NET only)

with AxNETHost1 do
begin
	AssemblyQualifiedName := 'System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089';
	OutputDebugString( Host.Item['ProductVersion'].Value );
end

Delphi (standard)

with NETHost1 do
begin
	AssemblyQualifiedName := 'System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089';
	OutputDebugString( Host.Item['ProductVersion'].Value );
end

VFP

with thisform.NETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	DEBUGOUT( .Host.Item("ProductVersion").Value )
endwith

dBASE Plus

local oNETHost

oNETHost = form.Activex1.nativeObject
oNETHost.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
? Str(oNETHost.Host.Item("ProductVersion").Value) 

XBasic (Alpha Five)

Dim oNETHost as P

oNETHost = topparent:CONTROL_ACTIVEX1.activex
oNETHost.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
? oNETHost.Host.Item("ProductVersion").Value 

Visual Objects


oDCOCX_Exontrol1:AssemblyQualifiedName := "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Host:[Item,"ProductVersion"]:Value) ))

PowerBuilder

OleObject oNETHost

oNETHost = ole_1.Object
oNETHost.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
MessageBox("Information",string( String(oNETHost.Host.Item("ProductVersion").Value) ))

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyQualifiedName to "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	Variant v
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Variant voNETHostObject1
		Get ComItem of hoNETHostObject "ProductVersion" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Get ComValue of hoNETHostObject1 to v
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
	Showln v
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oNETHost

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oNETHost := XbpActiveXControl():new( oForm:drawingArea )
	oNETHost:CLSID  := "Exontrol.NETHost" /*{FDCBA3E0-4E2F-4DC7-B073-EAA7BD7EC565}*/
	oNETHost:create(,, {10,60},{610,370} )

		oNETHost:AssemblyQualifiedName := "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
		DevOut( Transform(oNETHost:Host:Item("ProductVersion"):Value(),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN