23
|
How can I insert a PrintPreviewControl control
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.PrintPreviewControl");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "UseAntiAlias = True");
_ObjectSetProperty( nethostobject , "Template", "Zoom = 0.75");
_ObjectSetProperty( nethostobject , "Template", "Document = CreateObject(`System.Drawing.Printing.PrintDocument, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToke" +
"n=b03f5f7f11d50a3a`)");
|
22
|
How can I play animated GIF using the control

OBJECT nethost;
nethost = ObjectByName("AN1") ;
_ObjectCallMethod( nethost , "Create", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.Label");
_ObjectSetProperty( _ObjectGetProperty( nethost , "Host") , "Template", "Image = LoadPicture(`C:\Program Files (x86)\Exontrol\ExNETHost\Sample\wait.gif`)");
|
21
|
How can I use the Template property
OBJECT nethost;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TreeView");
_ObjectSetProperty( _ObjectGetProperty( nethost , "Host") , "Template", "Nodes { Add(`Root 1`).Nodes { Add(`Child 1`); Add(`Child 2`) } }");
|
20
|
How can I use the TemplateResult property (method 2)
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TreeView");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "Nodes.Add(`Root 1`){ BackColor = RGB(255,0,0);ForeColor = RGB(255,255,255) }");
_ObjectSetProperty( _ObjectGetProperty( nethostobject , "TemplateResult") , "Template", "Nodes{ Add(`Child 1`); Add(`Child 2`) }; Expand() }");
|
19
|
How can I use the TemplateResult property (method 1)
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TreeView");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "Nodes.Add(`Root 1`)");
nethostobject = _ObjectGetProperty( nethostobject , "TemplateResult");
_ObjectSetProperty( nethostobject , "Template", "Nodes.Add(`Child 1`)");
_ObjectSetProperty( nethostobject , "Template", "Nodes.Add(`Child 2`)");
_ObjectSetProperty( nethostobject , "Template", "Expand()");
|
18
|
How can I find the information about the hosting control, like name, version, ...
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyQualifiedName", "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectCallMethod(nethost, "TemplatePut", "Dim netObj")
_ObjectCallMethod(nethost, "TemplatePut", nethostobject)
Message( _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`ProductName`).Value") );
Message( _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`ProductVersion`).Value") );
Message( _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`CompanyName`).Value") );
|
17
|
How do I get the hwnd/handle of the hosting control
OBJECT nethost;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectCallMethod(nethost, "TemplatePut", "Dim _ObObj")
_ObjectCallMethod(nethost, "TemplatePut", _ObjectGetProperty( nethost , "Host"))
Message( _ObjectCallMethod(nethost, "ExecuteTemplate", "_ObObj.Item(`Handle`).AsInt") );
|
16
|
How do I get the number of arguments that an event has
// HostEvent event - The hosting control fires an event.
FUNCTION nethostEvents_HostEvent(OBJECT nethost, OBJECT Ev)
Message( "Ev.Arguments.Item(^"GetType().GetProperties().Length^").AsString" );
Message( Ev );
END
OBJECT nethost;
nethost = ObjectByName("AN1") ;
ObjectAssociateEvents("nethostEvents", nethost);
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
|
15
|
How can I change the control's background color, as BackgroundColor seems to have no effect

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TreeView");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "BackColor = RGB(240,240,240)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Root`)`)");
_ObjectCallMethod(nethost, "TemplatePut", "Dim netObj")
_ObjectCallMethod(nethost, "TemplatePut", nethostobject)
var_NETHostObject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 1`)`)");
var_NETHostObject1 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 2`)`)");
var_Object = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Expand()`)");
|
14
|
How can I add a TreeView

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TreeView");
nethostobject = _ObjectGetProperty( nethost , "Host");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Root 1`)`)");
_ObjectCallMethod(nethost, "TemplatePut", "Dim netObj")
_ObjectCallMethod(nethost, "TemplatePut", nethostobject)
var_NETHostObject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 1`)`)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 2`)`)");
_ObjectCallMethod(nethost, "TemplatePut", "Dim netObj")
_ObjectCallMethod(nethost, "TemplatePut", nethostobject)
var_NETHostObject1 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Sub-Child 2.1`)`)");
var_NETHostObject2 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Sub-Child 2.2`)`)");
var_NETHostObject3 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Sub-Child 2.3`)`)");
var_Object = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Expand()`)");
_ObjectCallMethod(nethost, "TemplatePut", "Dim netObj")
_ObjectCallMethod(nethost, "TemplatePut", nethostobject)
var_NETHostObject4 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 3`)`)");
var_Object1 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Expand()`)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Root 2`)`)");
var_NETHostObject5 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 1`)`)");
var_NETHostObject6 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 2`)`)");
var_NETHostObject7 = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`Nodes.Add(`Child 3`)`)");
|
13
|
How can I add a ProgressBar

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.ProgressBar");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim percent");
_ObjectCallMethod( nethostobject , "SetTemplateDef", 50);
_ObjectSetProperty( nethostobject , "Template", "Value = percent");
|
12
|
How can I add a DateTimePicker

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.DateTimePicker");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim date");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "1/1/2001");
_ObjectSetProperty( nethostobject , "Template", "Value = date");
|
11
|
How can I add CheckedListBox

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.CheckedListBox");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "FormattingEnabled = True");
_ObjectSetProperty( nethostobject , "Template", "Items.Add(`Check 1`)");
_ObjectSetProperty( nethostobject , "Template", "Items.Add(`Check 2`,True)");
|
10
|
How can I specify the list of events to be handled
// HostEvent event - The hosting control fires an event.
FUNCTION nethostEvents_HostEvent(OBJECT nethost, OBJECT Ev)
Message( Ev );
Message( "Button " );
Message( Ev );
END
OBJECT nethost;
nethost = ObjectByName("AN1") ;
ObjectAssociateEvents("nethostEvents", nethost);
_ObjectSetProperty( nethost , "BackgroundColor", 16777215);
_ObjectSetProperty( nethost , "HostEvents", "MouseUp MouseDown");
_ObjectCallMethod( nethost , "Create", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar");
_ObjectSetProperty( _ObjectGetProperty( nethost , "Host") , "Template", "MaxSelectionCount = 1");
|
9
|
Is it possible to handle only a specific event
// HostEvent event - The hosting control fires an event.
FUNCTION nethostEvents_HostEvent(OBJECT nethost, OBJECT Ev)
Message( Ev );
END
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
ObjectAssociateEvents("nethostEvents", nethost);
_ObjectSetProperty( nethost , "BackgroundColor", 16777215);
_ObjectCallMethod( nethost , "Create", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar");
_ObjectSetProperty( nethost , "HostEvents", "DateSelected");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "MaxSelectionCount = 1");
|
8
|
How can I handle events withing the control
// HostEvent event - The hosting control fires an event.
FUNCTION nethostEvents_HostEvent(OBJECT nethost, OBJECT Ev)
Message( Ev );
END
OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
ObjectAssociateEvents("nethostEvents", nethost);
_ObjectSetProperty( nethost , "BackgroundColor", 16777215);
_ObjectCallMethod( nethost , "Create", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "MaxSelectionCount = 1");
|
7
|
How can I add the Tab page, and pages inside (method 2)

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TabControl");
nethostobject = _ObjectGetProperty( nethost , "Host");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`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`)");
_ObjectSetProperty( nethostobject , "Template", "Text = `Page 1`;UseVisualStyleBackColor = True");
_ObjectSetProperty( nethostobject , "Template", "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b7" +
"7a5c561934e089`){Text=`Button 2`;Dock=1}; Controls.Add(c)");
_ObjectSetProperty( nethostobject , "Template", "Dim c; c = CreateObject(`System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b7" +
"7a5c561934e089`){Text=`Button 1`;Dock=1}; Controls.Add(c)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`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`)");
_ObjectSetProperty( nethostobject , "Template", "Text = `Page 1`;UseVisualStyleBackColor = True");
_ObjectSetProperty( nethostobject , "Template", "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b" +
"77a5c561934e089`){Text=`Edit 2`;Dock=1}; Controls.Add(c)");
_ObjectSetProperty( nethostobject , "Template", "Dim c; c = CreateObject(`System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b" +
"77a5c561934e089`){Text=`Edit 1`;Dock=1}; Controls.Add(c)");
|
6
|
How can I add the Tab page, and pages inside (method 1)

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.TabControl");
nethostobject = _ObjectGetProperty( nethost , "Host");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)`)");
_ObjectSetProperty( nethostobject , "Template", "Text = `Page 1`;UseVisualStyleBackColor = True");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim page");
_ObjectCallMethod( nethostobject , "SetTemplateDef", _ObjectGetProperty( _ObjectGetProperty( nethostobject , "TemplateResult") , "Value"));
_ObjectSetProperty( nethostobject , "Template", "Controls.Add(page)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`CreateObject(`System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)`)");
_ObjectSetProperty( nethostobject , "Template", "Text = `Page 2`;UseVisualStyleBackColor = True");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim page");
_ObjectCallMethod( nethostobject , "SetTemplateDef", _ObjectGetProperty( _ObjectGetProperty( nethostobject , "TemplateResult") , "Value"));
_ObjectSetProperty( nethostobject , "Template", "Controls.Add(page)");
|
5
|
Just wondering if I can host your /NET control

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Program Files\Exontrol\ExG2antt.NET\Sample\exontrol.exg2antt.dll");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "LoadXML(`http://www.exontrol.net/testing.xml`)");
|
4
|
How can I insert the MonthCalendar of /NET framework

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "BackgroundColor", 16777215);
_ObjectCallMethod( nethost , "Create", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll","System.Windows.Forms.MonthCalendar");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim x");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "1/1/2001");
_ObjectSetProperty( nethostobject , "Template", "MaxSelectionCount = 1;SelectionStart = x");
|
3
|
How can I use the AssemblyQualifiedName property

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyQualifiedName", "System.Windows.Forms.ListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "Host.Item(`Items`)");
_ObjectSetProperty( nethostobject , "Template", "Add(2001)");
_ObjectSetProperty( nethostobject , "Template", "Add(4.1234)");
_ObjectSetProperty( nethostobject , "Template", "Add(#1/1/2001#)");
_ObjectSetProperty( nethostobject , "Template", "Add(RGB(255,0,0))");
_ObjectSetProperty( nethostobject , "Template", "Add(1);Add(2);Add(3)");
|
2
|
How can I use the AssemblyLocation property

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyLocation", "C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll");
_ObjectSetProperty( nethost , "AssemblyName", "System.Windows.Forms.ListView");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "Items.Add(`first`)");
nethostobject = _ObjectCallMethod(nethost, "ExecuteTemplate", "netObj.Item(`CreateObject(`System.Windows.Forms.ListViewItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`)`)");
_ObjectSetProperty( nethostobject , "Template", "Text = `second`;ForeColor = RGB(255,0,0)");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "Dim n");
_ObjectCallMethod( nethostobject , "SetTemplateDef", _ObjectGetProperty( _ObjectGetProperty( nethostobject , "TemplateResult") , "Value"));
_ObjectSetProperty( nethostobject , "Template", "Items.Add(n)");
_ObjectSetProperty( nethostobject , "Template", "Items.Add(`third`)");
|
1
|
How can I insert the PropertyGrid of /NET framework

OBJECT nethost,nethostobject;
nethost = ObjectByName("AN1") ;
_ObjectSetProperty( nethost , "AssemblyQualifiedName", "System.Windows.Forms.PropertyGrid, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
nethostobject = _ObjectGetProperty( nethost , "Host");
_ObjectSetProperty( nethostobject , "Template", "BackColor = RGB(255,255,255);ViewBackColor = RGB(255,255,255);LineColor = ViewBackColor");
_ObjectCallMethod( nethostobject , "SetTemplateDef", "dim object");
_ObjectCallMethod( nethostobject , "SetTemplateDef", nethost);
_ObjectSetProperty( nethostobject , "Template", "SelectedObject = object");
|