Type | Description | |||
String | A string expression that indicates the control's version. |
The following samples shows how you can get information about the hosting control, like name, version, ...
VBA (MS Access, Excell...)
With NETHost1 .AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" With .Host Debug.Print( .Item("ProductName").Value ) Debug.Print( .Item("ProductVersion").Value ) Debug.Print( .Item("CompanyName").Value ) End With End With
VB6
With NETHost1 .AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" With .Host Debug.Print( .Item("ProductName").Value ) Debug.Print( .Item("ProductVersion").Value ) Debug.Print( .Item("CompanyName").Value ) End With End With
VB.NET
With Exnethost1 .AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" With .Host Debug.Print( .Item("ProductName").Value ) Debug.Print( .Item("ProductVersion").Value ) Debug.Print( .Item("CompanyName").Value ) End With 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" With .Host Debug.Print( .Item("ProductName").Value ) Debug.Print( .Item("ProductVersion").Value ) Debug.Print( .Item("CompanyName").Value ) End With 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"); exontrol_NETHost::INETHostObjectPtr var_NETHostObject = spNETHost1->GetHost(); OutputDebugStringW( _bstr_t(var_NETHostObject->GetItem(L"ProductName")->GetValue()) ); OutputDebugStringW( _bstr_t(var_NETHostObject->GetItem(L"ProductVersion")->GetValue()) ); OutputDebugStringW( _bstr_t(var_NETHostObject->GetItem(L"CompanyName")->GetValue()) );
C++ Builder
NETHost1->AssemblyQualifiedName = L"System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; Exontrol_nethost_tlb::INETHostObjectPtr var_NETHostObject = NETHost1->Host; OutputDebugString( PChar(var_NETHostObject->get_Item(L"ProductName")->get_Value()) ); OutputDebugString( PChar(var_NETHostObject->get_Item(L"ProductVersion")->get_Value()) ); OutputDebugString( PChar(var_NETHostObject->get_Item(L"CompanyName")->get_Value()) );
C#
exnethost1.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; exontrol_NETHost.NETHostObject var_NETHostObject = exnethost1.Host; System.Diagnostics.Debug.Print( var_NETHostObject["ProductName"].Value.ToString() ); System.Diagnostics.Debug.Print( var_NETHostObject["ProductVersion"].Value.ToString() ); System.Diagnostics.Debug.Print( var_NETHostObject["CompanyName"].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"; var var_NETHostObject = NETHost1.Host; alert( var_NETHostObject.Item("ProductName").Value ); alert( var_NETHostObject.Item("ProductVersion").Value ); alert( var_NETHostObject.Item("CompanyName").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" With .Host alert( .Item("ProductName").Value ) alert( .Item("ProductVersion").Value ) alert( .Item("CompanyName").Value ) End With 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"; exontrol_NETHost.NETHostObject var_NETHostObject = axNETHost1.Host; System.Diagnostics.Debug.Print( var_NETHostObject["ProductName"].Value.ToString() ); System.Diagnostics.Debug.Print( var_NETHostObject["ProductVersion"].Value.ToString() ); System.Diagnostics.Debug.Print( var_NETHostObject["CompanyName"].Value.ToString() );
X++ (Dynamics Ax 2009)
public void init() { COM com_NETHostObject; anytype var_NETHostObject; ; super(); exnethost1.AssemblyQualifiedName("System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); var_NETHostObject = exnethost1.Host(); com_NETHostObject = var_NETHostObject; print( com_NETHostObject.Item("ProductName").Value() ); print( com_NETHostObject.Item("ProductVersion").Value() ); print( com_NETHostObject.Item("CompanyName").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'; with Host do begin OutputDebugString( Item['ProductName'].Value ); OutputDebugString( Item['ProductVersion'].Value ); OutputDebugString( Item['CompanyName'].Value ); end; end
Delphi (standard)
with NETHost1 do begin AssemblyQualifiedName := 'System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'; with Host do begin OutputDebugString( Item['ProductName'].Value ); OutputDebugString( Item['ProductVersion'].Value ); OutputDebugString( Item['CompanyName'].Value ); end; end
VFP
with thisform.NETHost1 .AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" with .Host DEBUGOUT( .Item("ProductName").Value ) DEBUGOUT( .Item("ProductVersion").Value ) DEBUGOUT( .Item("CompanyName").Value ) endwith endwith
dBASE Plus
local oNETHost,var_NETHostObject oNETHost = form.Activex1.nativeObject oNETHost.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" var_NETHostObject = oNETHost.Host ? Str(var_NETHostObject.Item("ProductName").Value) ? Str(var_NETHostObject.Item("ProductVersion").Value) ? Str(var_NETHostObject.Item("CompanyName").Value)
XBasic (Alpha Five)
Dim oNETHost as P Dim var_NETHostObject 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" var_NETHostObject = oNETHost.Host ? var_NETHostObject.Item("ProductName").Value ? var_NETHostObject.Item("ProductVersion").Value ? var_NETHostObject.Item("CompanyName").Value
Visual Objects
local var_NETHostObject as INETHostObject oDCOCX_Exontrol1:AssemblyQualifiedName := "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" var_NETHostObject := oDCOCX_Exontrol1:Host OutputDebugString(String2Psz( AsString(var_NETHostObject:[Item,"ProductName"]:Value) )) OutputDebugString(String2Psz( AsString(var_NETHostObject:[Item,"ProductVersion"]:Value) )) OutputDebugString(String2Psz( AsString(var_NETHostObject:[Item,"CompanyName"]:Value) ))
PowerBuilder
OleObject oNETHost,var_NETHostObject oNETHost = ole_1.Object oNETHost.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" var_NETHostObject = oNETHost.Host MessageBox("Information",string( String(var_NETHostObject.Item("ProductName").Value) )) MessageBox("Information",string( String(var_NETHostObject.Item("ProductVersion").Value) )) MessageBox("Information",string( String(var_NETHostObject.Item("CompanyName").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 voNETHostObject Get ComHost to voNETHostObject Handle hoNETHostObject Get Create (RefClass(cComNETHostObject)) to hoNETHostObject Set pvComObject of hoNETHostObject to voNETHostObject Variant v Variant voNETHostObject1 Get ComItem of hoNETHostObject "ProductName" 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 Showln v Variant v1 Variant voNETHostObject2 Get ComItem of hoNETHostObject "ProductVersion" to voNETHostObject2 Handle hoNETHostObject2 Get Create (RefClass(cComNETHostObject)) to hoNETHostObject2 Set pvComObject of hoNETHostObject2 to voNETHostObject2 Get ComValue of hoNETHostObject2 to v1 Send Destroy to hoNETHostObject2 Showln v1 Variant v2 Variant voNETHostObject3 Get ComItem of hoNETHostObject "CompanyName" to voNETHostObject3 Handle hoNETHostObject3 Get Create (RefClass(cComNETHostObject)) to hoNETHostObject3 Set pvComObject of hoNETHostObject3 to voNETHostObject3 Get ComValue of hoNETHostObject3 to v2 Send Destroy to hoNETHostObject3 Showln v2 Send Destroy to hoNETHostObject End_Procedure
XBase++
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oNETHostObject 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" oNETHostObject := oNETHost:Host() DevOut( Transform(oNETHostObject:Item("ProductName"):Value(),"") ) DevOut( Transform(oNETHostObject:Item("ProductVersion"):Value(),"") ) DevOut( Transform(oNETHostObject:Item("CompanyName"):Value(),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN