22
How can I play animated GIF using the control

Procedure OnCreate
	Forward Send OnCreate
	Get ComCreate "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "System.Windows.Forms.Label" to Nothing
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "Image = LoadPicture(`C:\Program Files (x86)\Exontrol\ExNETHost\Sample\wait.gif`)"
	Send Destroy to hoNETHostObject
End_Procedure
21
How can I use the Template property
Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TreeView"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "Nodes { Add(`Root 1`).Nodes { Add(`Child 1`); Add(`Child 2`) }  }"
	Send Destroy to hoNETHostObject
End_Procedure
20
How can I use the TemplateResult property (method 2)
Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TreeView"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "Nodes.Add(`Root 1`){ BackColor = RGB(255,0,0);ForeColor = RGB(255,255,255) }"
		Variant voNETHostObject1
		Get ComTemplateResult of hoNETHostObject to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Nodes{ Add(`Child 1`); Add(`Child 2`) }; Expand() }"
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
End_Procedure
19
How can I use the TemplateResult property (method 1)
Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TreeView"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "Nodes.Add(`Root 1`)"
		Variant voNETHostObject1
		Get ComTemplateResult of hoNETHostObject to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Nodes.Add(`Child 1`)"
			Set ComTemplate of hoNETHostObject1 to "Nodes.Add(`Child 2`)"
			Set ComTemplate of hoNETHostObject1 to "Expand()"
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
End_Procedure
18
How can I find the information about the hosting control, like name, version, ...
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
17
How do I get the hwnd/handle of the hosting control
Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	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 "Handle" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Get ComAsInt of hoNETHostObject1 to v
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
	Showln v
End_Procedure
16
How do I get the number of arguments that an event has
// The hosting control fires an event.
Procedure OnComHostEvent Variant   llEv
	Forward Send OnComHostEvent llEv
	Showln "Ev.Arguments.Item("GetType().GetProperties().Length").AsString"
	Showln  llEv
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
End_Procedure
15
How can I change the control's background color, as BackgroundColor seems to have no effect

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TreeView"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "BackColor = RGB(240,240,240)"
		Variant voNETHostObject1
		Get ComItem of hoNETHostObject "Nodes.Add(`Root`)" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Variant var_NETHostObject
			Get ComItem of hoNETHostObject1 "Nodes.Add(`Child 1`)" to var_NETHostObject
			Variant var_NETHostObject1
			Get ComItem of hoNETHostObject1 "Nodes.Add(`Child 2`)" to var_NETHostObject1
			Variant var_Object
			Get ComItem of hoNETHostObject1 "Expand()" to var_Object
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
End_Procedure
14
How can I add a TreeView

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TreeView"
	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 "Nodes.Add(`Root 1`)" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Variant var_NETHostObject
			Get ComItem of hoNETHostObject1 "Nodes.Add(`Child 1`)" to var_NETHostObject
			Variant voNETHostObject2
			Get ComItem of hoNETHostObject1 "Nodes.Add(`Child 2`)" to voNETHostObject2
			Handle hoNETHostObject2
			Get Create (RefClass(cComNETHostObject)) to hoNETHostObject2
			Set pvComObject of hoNETHostObject2 to voNETHostObject2
				Variant var_NETHostObject1
				Get ComItem of hoNETHostObject2 "Nodes.Add(`Sub-Child 2.1`)" to var_NETHostObject1
				Variant var_NETHostObject2
				Get ComItem of hoNETHostObject2 "Nodes.Add(`Sub-Child 2.2`)" to var_NETHostObject2
				Variant var_NETHostObject3
				Get ComItem of hoNETHostObject2 "Nodes.Add(`Sub-Child 2.3`)" to var_NETHostObject3
				Variant var_Object
				Get ComItem of hoNETHostObject2 "Expand()" to var_Object
			Send Destroy to hoNETHostObject2
			Variant var_NETHostObject4
			Get ComItem of hoNETHostObject1 "Nodes.Add(`Child 3`)" to var_NETHostObject4
			Variant var_Object1
			Get ComItem of hoNETHostObject1 "Expand()" to var_Object1
		Send Destroy to hoNETHostObject1
		Variant voNETHostObject3
		Get ComItem of hoNETHostObject "Nodes.Add(`Root 2`)" to voNETHostObject3
		Handle hoNETHostObject3
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject3
		Set pvComObject of hoNETHostObject3 to voNETHostObject3
			Variant var_NETHostObject5
			Get ComItem of hoNETHostObject3 "Nodes.Add(`Child 1`)" to var_NETHostObject5
			Variant var_NETHostObject6
			Get ComItem of hoNETHostObject3 "Nodes.Add(`Child 2`)" to var_NETHostObject6
			Variant var_NETHostObject7
			Get ComItem of hoNETHostObject3 "Nodes.Add(`Child 3`)" to var_NETHostObject7
		Send Destroy to hoNETHostObject3
	Send Destroy to hoNETHostObject
End_Procedure
13
How can I add a ProgressBar

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.ProgressBar"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Send ComSetTemplateDef of hoNETHostObject "Dim percent"
		Send ComSetTemplateDef of hoNETHostObject 50
		Set ComTemplate of hoNETHostObject to "Value = percent"
	Send Destroy to hoNETHostObject
End_Procedure
12
How can I add a DateTimePicker

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.DateTimePicker"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Send ComSetTemplateDef of hoNETHostObject "Dim date"
		Send ComSetTemplateDef of hoNETHostObject "1/1/2001"
		Set ComTemplate of hoNETHostObject to "Value = date"
	Send Destroy to hoNETHostObject
End_Procedure
11
How can I add CheckedListBox

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.CheckedListBox"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "FormattingEnabled = True"
		Set ComTemplate of hoNETHostObject to "Items.Add(`Check 1`)"
		Set ComTemplate of hoNETHostObject to "Items.Add(`Check 2`,True)"
	Send Destroy to hoNETHostObject
End_Procedure
10
How can I specify the list of events to be handled
// The hosting control fires an event.
Procedure OnComHostEvent Variant   llEv
	Forward Send OnComHostEvent llEv
	Showln llEv
	Showln "Button " llEv
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComBackgroundColor to 16777215
	Set ComHostEvents to "MouseUp MouseDown"
	Get ComCreate "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "System.Windows.Forms.MonthCalendar" to Nothing
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "MaxSelectionCount = 1"
	Send Destroy to hoNETHostObject
End_Procedure
9
Is it possible to handle only a specific event
// The hosting control fires an event.
Procedure OnComHostEvent Variant   llEv
	Forward Send OnComHostEvent llEv
	Showln llEv
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComBackgroundColor to 16777215
	Get ComCreate "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "System.Windows.Forms.MonthCalendar" to Nothing
	Set ComHostEvents to "DateSelected"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "MaxSelectionCount = 1"
	Send Destroy to hoNETHostObject
End_Procedure
8
How can I handle events withing the control
// The hosting control fires an event.
Procedure OnComHostEvent Variant   llEv
	Forward Send OnComHostEvent llEv
	Showln llEv
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComBackgroundColor to 16777215
	Get ComCreate "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "System.Windows.Forms.MonthCalendar" to Nothing
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "MaxSelectionCount = 1"
	Send Destroy to hoNETHostObject
End_Procedure
7
How can I add the Tab page, and pages inside (method 2)

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TabControl"
	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 "Dim page; page = CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text = `new`};Controls.Add(page);page" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Text = `Page 1`;UseVisualStyleBackColor = True"
			Set ComTemplate of hoNETHostObject1 to "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text=`Button 2`;Dock=1}; Controls.Add(c)"
			Set ComTemplate of hoNETHostObject1 to "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text=`Button 1`;Dock=1}; Controls.Add(c)"
		Send Destroy to hoNETHostObject1
		Variant voNETHostObject2
		Get ComItem of hoNETHostObject "Dim page; page = CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text = `new`};Controls.Add(page);page" to voNETHostObject2
		Handle hoNETHostObject2
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject2
		Set pvComObject of hoNETHostObject2 to voNETHostObject2
			Set ComTemplate of hoNETHostObject2 to "Text = `Page 1`;UseVisualStyleBackColor = True"
			Set ComTemplate of hoNETHostObject2 to "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text=`Edit 2`;Dock=1}; Controls.Add(c)"
			Set ComTemplate of hoNETHostObject2 to "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`){Text=`Edit 1`;Dock=1}; Controls.Add(c)"
		Send Destroy to hoNETHostObject2
	Send Destroy to hoNETHostObject
End_Procedure
6
How can I add the Tab page, and pages inside (method 1)

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.TabControl"
	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 "CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Text = `Page 1`;UseVisualStyleBackColor = True"
		Send Destroy to hoNETHostObject1
		Send ComSetTemplateDef of hoNETHostObject "Dim page"
		Variant vValue
		Variant voNETHostObject2
		Get ComTemplateResult of hoNETHostObject to voNETHostObject2
		Handle hoNETHostObject2
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject2
		Set pvComObject of hoNETHostObject2 to voNETHostObject2
			Get ComValue of hoNETHostObject2 to vValue
		Send Destroy to hoNETHostObject2
		Send ComSetTemplateDef of hoNETHostObject vValue
		Set ComTemplate of hoNETHostObject to "Controls.Add(page)"
		Variant voNETHostObject3
		Get ComItem of hoNETHostObject "CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)" to voNETHostObject3
		Handle hoNETHostObject3
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject3
		Set pvComObject of hoNETHostObject3 to voNETHostObject3
			Set ComTemplate of hoNETHostObject3 to "Text = `Page 2`;UseVisualStyleBackColor = True"
		Send Destroy to hoNETHostObject3
		Send ComSetTemplateDef of hoNETHostObject "Dim page"
		Variant vValue1
		Variant voNETHostObject4
		Get ComTemplateResult of hoNETHostObject to voNETHostObject4
		Handle hoNETHostObject4
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject4
		Set pvComObject of hoNETHostObject4 to voNETHostObject4
			Get ComValue of hoNETHostObject4 to vValue1
		Send Destroy to hoNETHostObject4
		Send ComSetTemplateDef of hoNETHostObject vValue1
		Set ComTemplate of hoNETHostObject to "Controls.Add(page)"
	Send Destroy to hoNETHostObject
End_Procedure
5
Just wondering if I can host your /NET control

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Program Files\Exontrol\ExG2antt.NET\Sample\exontrol.exg2antt.dll"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "LoadXML(`http://www.exontrol.net/testing.xml`)"
	Send Destroy to hoNETHostObject
End_Procedure
4
How can I insert the MonthCalendar of /NET framework

Procedure OnCreate
	Forward Send OnCreate
	Set ComBackgroundColor to 16777215
	Get ComCreate "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "System.Windows.Forms.MonthCalendar" to Nothing
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Send ComSetTemplateDef of hoNETHostObject "Dim x"
		Send ComSetTemplateDef of hoNETHostObject "1/1/2001"
		Set ComTemplate of hoNETHostObject to "MaxSelectionCount = 1;SelectionStart = x"
	Send Destroy to hoNETHostObject
End_Procedure
3
How can I use the AssemblyQualifiedName property

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 voNETHostObject1
		Get ComItem of hoNETHostObject "Items" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Add(2001)"
			Set ComTemplate of hoNETHostObject1 to "Add(4.1234)"
			Set ComTemplate of hoNETHostObject1 to "Add(#1/1/2001#)"
			Set ComTemplate of hoNETHostObject1 to "Add(RGB(255,0,0))"
			Set ComTemplate of hoNETHostObject1 to "Add(1);Add(2);Add(3)"
		Send Destroy to hoNETHostObject1
	Send Destroy to hoNETHostObject
End_Procedure
2
How can I use the AssemblyLocation property

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyLocation to "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	Set ComAssemblyName to "System.Windows.Forms.ListView"
	Variant voNETHostObject
	Get ComHost to voNETHostObject
	Handle hoNETHostObject
	Get Create (RefClass(cComNETHostObject)) to hoNETHostObject
	Set pvComObject of hoNETHostObject to voNETHostObject
		Set ComTemplate of hoNETHostObject to "Items.Add(`first`)"
		Variant voNETHostObject1
		Get ComItem of hoNETHostObject "CreateObject(`System.Windows.Forms.ListViewItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)" to voNETHostObject1
		Handle hoNETHostObject1
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject1
		Set pvComObject of hoNETHostObject1 to voNETHostObject1
			Set ComTemplate of hoNETHostObject1 to "Text = `second`;ForeColor = RGB(255,0,0)"
		Send Destroy to hoNETHostObject1
		Send ComSetTemplateDef of hoNETHostObject "Dim n"
		Variant vValue
		Variant voNETHostObject2
		Get ComTemplateResult of hoNETHostObject to voNETHostObject2
		Handle hoNETHostObject2
		Get Create (RefClass(cComNETHostObject)) to hoNETHostObject2
		Set pvComObject of hoNETHostObject2 to voNETHostObject2
			Get ComValue of hoNETHostObject2 to vValue
		Send Destroy to hoNETHostObject2
		Send ComSetTemplateDef of hoNETHostObject vValue
		Set ComTemplate of hoNETHostObject to "Items.Add(n)"
		Set ComTemplate of hoNETHostObject to "Items.Add(`third`)"
	Send Destroy to hoNETHostObject
End_Procedure
1
How can I insert the PropertyGrid of /NET framework

Procedure OnCreate
	Forward Send OnCreate
	Set ComAssemblyQualifiedName to "System.Windows.Forms.PropertyGrid, 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
		Set ComTemplate of hoNETHostObject to "BackColor = RGB(255,255,255);ViewBackColor = RGB(255,255,255);LineColor = ViewBackColor"
		Send ComSetTemplateDef of hoNETHostObject "dim object"
		Send ComSetTemplateDef of hoNETHostObject (pvComObject(Self))
		Set ComTemplate of hoNETHostObject to "SelectedObject = object"
	Send Destroy to hoNETHostObject
End_Procedure