22
How can I play animated GIF using the control

with thisform.NETHost1
	.Create("C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.Label")
	.Host.Template = "Image = LoadPicture(`C:\Program Files (x86)\Exontrol\ExNETHost\Sample\wait.gif`)"
endwith
21
How can I use the Template property
with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TreeView"
	.Host.Template = "Nodes { Add(`Root 1`).Nodes { Add(`Child 1`); Add(`Child 2`) }  }"
endwith
20
How can I use the TemplateResult property (method 2)
with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TreeView"
	with .Host
		.Template = "Nodes.Add(`Root 1`){ BackColor = RGB(255,0,0);ForeColor = RGB(255,255,255) }"
		.TemplateResult.Template = "Nodes{ Add(`Child 1`); Add(`Child 2`) }; Expand() }"
	endwith
endwith
19
How can I use the TemplateResult property (method 1)
with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TreeView"
	with .Host
		.Template = "Nodes.Add(`Root 1`)"
		with .TemplateResult
			.Template = "Nodes.Add(`Child 1`)"
			.Template = "Nodes.Add(`Child 2`)"
			.Template = "Expand()"
		endwith
	endwith
endwith
18
How can I find the information about the hosting control, like name, version, ...
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
17
How do I get the hwnd/handle of the hosting control
with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	DEBUGOUT( .Host.Item("Handle").AsInt )
endwith
16
How do I get the number of arguments that an event has
*** HostEvent event - The hosting control fires an event. ***
LPARAMETERS Ev
	with thisform.NETHost1
		DEBUGOUT( "Ev.Arguments.Item("+chr(34)+"GetType().GetProperties().Length"+chr(34)+").AsString" )
			DEBUGOUT( Ev )
	endwith

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
endwith
15
How can I change the control's background color, as BackgroundColor seems to have no effect

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TreeView"
	with .Host
		.Template = "BackColor = RGB(240,240,240)"
		with .Item("Nodes.Add(`Root`)")
			var_NETHostObject = .Item("Nodes.Add(`Child 1`)")
			var_NETHostObject1 = .Item("Nodes.Add(`Child 2`)")
			var_Object = .Item("Expand()")
		endwith
	endwith
endwith
14
How can I add a TreeView

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TreeView"
	with .Host
		with .Item("Nodes.Add(`Root 1`)")
			var_NETHostObject = .Item("Nodes.Add(`Child 1`)")
			with .Item("Nodes.Add(`Child 2`)")
				var_NETHostObject1 = .Item("Nodes.Add(`Sub-Child 2.1`)")
				var_NETHostObject2 = .Item("Nodes.Add(`Sub-Child 2.2`)")
				var_NETHostObject3 = .Item("Nodes.Add(`Sub-Child 2.3`)")
				var_Object = .Item("Expand()")
			endwith
			var_NETHostObject4 = .Item("Nodes.Add(`Child 3`)")
			var_Object1 = .Item("Expand()")
		endwith
		with .Item("Nodes.Add(`Root 2`)")
			var_NETHostObject5 = .Item("Nodes.Add(`Child 1`)")
			var_NETHostObject6 = .Item("Nodes.Add(`Child 2`)")
			var_NETHostObject7 = .Item("Nodes.Add(`Child 3`)")
		endwith
	endwith
endwith
13
How can I add a ProgressBar

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.ProgressBar"
	with .Host
		.SetTemplateDef("Dim percent")
		.SetTemplateDef(50)
		.Template = "Value = percent"
	endwith
endwith
12
How can I add a DateTimePicker

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.DateTimePicker"
	with .Host
		.SetTemplateDef("Dim date")
		.SetTemplateDef({^2001-1-1})
		.Template = "Value = date"
	endwith
endwith
11
How can I add CheckedListBox

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.CheckedListBox"
	with .Host
		.Template = "FormattingEnabled = True"
		.Template = "Items.Add(`Check 1`)"
		.Template = "Items.Add(`Check 2`,True)"
	endwith
endwith
10
How can I specify the list of events to be handled
*** HostEvent event - The hosting control fires an event. ***
LPARAMETERS Ev
	with thisform.NETHost1
		DEBUGOUT( Ev )
		DEBUGOUT( "Button " )
		DEBUGOUT( Ev )
	endwith

with thisform.NETHost1
	.BackgroundColor = 16777215
	.HostEvents = "MouseUp MouseDown"
	.Create("C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar")
	.Host.Template = "MaxSelectionCount = 1"
endwith
9
Is it possible to handle only a specific event
*** HostEvent event - The hosting control fires an event. ***
LPARAMETERS Ev
	with thisform.NETHost1
		DEBUGOUT( Ev )
	endwith

with thisform.NETHost1
	.BackgroundColor = 16777215
	.Create("C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar")
	.HostEvents = "DateSelected"
	with .Host
		.Template = "MaxSelectionCount = 1"
	endwith
endwith
8
How can I handle events withing the control
*** HostEvent event - The hosting control fires an event. ***
LPARAMETERS Ev
	with thisform.NETHost1
		DEBUGOUT( Ev )
	endwith

with thisform.NETHost1
	.BackgroundColor = 16777215
	.Create("C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar")
	with .Host
		.Template = "MaxSelectionCount = 1"
	endwith
endwith
7
How can I add the Tab page, and pages inside (method 2)

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TabControl"
	with .Host
		var_s = "Dim page; page = CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyTo"
		var_s = var_s + "ken=b77a5c561934e089`){Text = `new`};Controls.Add(page);page"
		with .Item(var_s)
			.Template = "Text = `Page 1`;UseVisualStyleBackColor = True"
			var_s1 = "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77"
			var_s1 = var_s1 + "a5c561934e089`){Text=`Button 2`;Dock=1}; Controls.Add(c)"
			.Template = var_s1
			var_s2 = "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77"
			var_s2 = var_s2 + "a5c561934e089`){Text=`Button 1`;Dock=1}; Controls.Add(c)"
			.Template = var_s2
		endwith
		var_s3 = "Dim page; page = CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyTo"
		var_s3 = var_s3 + "ken=b77a5c561934e089`){Text = `new`};Controls.Add(page);page"
		with .Item(var_s3)
			.Template = "Text = `Page 1`;UseVisualStyleBackColor = True"
			var_s4 = "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b7"
			var_s4 = var_s4 + "7a5c561934e089`){Text=`Edit 2`;Dock=1}; Controls.Add(c)"
			.Template = var_s4
			var_s5 = "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b7"
			var_s5 = var_s5 + "7a5c561934e089`){Text=`Edit 1`;Dock=1}; Controls.Add(c)"
			.Template = var_s5
		endwith
	endwith
endwith
6
How can I add the Tab page, and pages inside (method 1)

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.TabControl"
	with .Host
		var_s = "CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e"
		var_s = var_s + "089`)"
		with .Item(var_s)
			.Template = "Text = `Page 1`;UseVisualStyleBackColor = True"
		endwith
		.SetTemplateDef("Dim page")
		.SetTemplateDef(.TemplateResult.Value)
		.Template = "Controls.Add(page)"
		var_s1 = "CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e"
		var_s1 = var_s1 + "089`)"
		with .Item(var_s1)
			.Template = "Text = `Page 2`;UseVisualStyleBackColor = True"
		endwith
		.SetTemplateDef("Dim page")
		.SetTemplateDef(.TemplateResult.Value)
		.Template = "Controls.Add(page)"
	endwith
endwith
5
Just wondering if I can host your /NET control

with thisform.NETHost1
	.AssemblyLocation = "C:\Program Files\Exontrol\ExG2antt.NET\Sample\exontrol.exg2antt.dll"
	with .Host
		.Template = "LoadXML(`http://www.exontrol.net/testing.xml`)"
	endwith
endwith
4
How can I insert the MonthCalendar of /NET framework

with thisform.NETHost1
	.BackgroundColor = 16777215
	.Create("C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar")
	with .Host
		.SetTemplateDef("Dim x")
		.SetTemplateDef({^2001-1-1})
		.Template = "MaxSelectionCount = 1;SelectionStart = x"
	endwith
endwith
3
How can I use the AssemblyQualifiedName property

with thisform.NETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	with .Host.Item("Items")
		.Template = "Add(2001)"
		.Template = "Add(4.1234)"
		.Template = "Add(#1/1/2001#)"
		.Template = "Add(RGB(255,0,0))"
		.Template = "Add(1);Add(2);Add(3)"
	endwith
endwith
2
How can I use the AssemblyLocation property

with thisform.NETHost1
	.AssemblyLocation = "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
	.AssemblyName = "System.Windows.Forms.ListView"
	with .Host
		.Template = "Items.Add(`first`)"
		var_s = "CreateObject(`System.Windows.Forms.ListViewItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56"
		var_s = var_s + "1934e089`)"
		with .Item(var_s)
			.Template = "Text = `second`;ForeColor = RGB(255,0,0)"
		endwith
		.SetTemplateDef("Dim n")
		.SetTemplateDef(.TemplateResult.Value)
		.Template = "Items.Add(n)"
		.Template = "Items.Add(`third`)"
	endwith
endwith
1
How can I insert the PropertyGrid of /NET framework

with thisform.NETHost1
	.AssemblyQualifiedName = "System.Windows.Forms.PropertyGrid, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
	with .Host
		.Template = "BackColor = RGB(255,255,255);ViewBackColor = RGB(255,255,255);LineColor = ViewBackColor"
		.SetTemplateDef("dim object")
		.SetTemplateDef(thisform.NETHost1)
		.Template = "SelectedObject = object"
	endwith
endwith