KiXforms Version 2.46

The KiXforms Library is a freeware object oriented extension to the KiXtart scripting language. It provides a comprehensive collection of forms and controls for building many kinds of graphical applications.

KiXforms was developed by Shawn Tassie of CGI Canada. The KiXtart scripting language was developed by Ruud van Velsen of Microsoft Netherlands. The KiXforms Web Site site is developed and maintained by Rodney Clarke of BEA Systems UK.

This help file contains the latest information about KiXforms. For further information or to make suggestions or report bugs, please visit us at: The KiXforms Web Site

AdminScriptEditor. ASE is the only script editor designed exclusively for Windows administrators. ASE offers a wide range of professional features and tools, including the popular Script Packager™ that lets you combine your script with any needed support files in a secure executable file that can even be configured to run with alternate user credentials. Find out more.

Start to Finish Guide to Scripting with KiXtart The ultimate guide to KiXtart - tech-edited by the creator of KiXtart himself, Ruud van Velsen! As the first book available on the subject, The Start to Finish Guide to Scripting with KiXtart serves as a comprehensive reference for beginners and experts alike. Real-world code examples, tips on reported problems, and even alternative methods or utilities are provided throughout the book. Find out more.

KiXforms Designer This freeware tool provides a graphical interface to the creation of forms using the KiXforms DLL. Find out more.

Type Library Viewer (Freeware) This freeware tool provides a way to browse through type library files (.EXE, .DLL, .TLB, .OCX) and discover what methods, properties and events are provided by each. This proves quite useful when developing scripts that take advantage of COM architecture. Find out more.


Installation Instructions

INSTALL

NOTE: KiXforms will run on the Windows 9x platform but has some minor issues. For advanced techniques please use KiXforms on NT/2000/XP/2003 platforms.

  • You must have Administrative rights on NT/2000/XP/2003 in order to successfully install the KiXforms DLL file.
  • The KiXforms Library is comprised of a single DLL (Dynamic Link Library) file which must be installed prior to using KiXforms.
  • Download KiXforms from http://www.kixforms.org/.
  • Even though DLL files will run from any folder when registered on the system, DLL files should be installed in the SYSTEM or SYSTEM32 folder depending upon platform:
    • Windows 95/98/ME %WINDIR%\SYSTEM typically C:\WINDOWS\SYSTEM
    • Windows NT/2000/XP/2003 %SystemRoot%\SYSTEM32 typically C:\WINNT\SYSTEM32
  • Unzip the downloaded KiXforms archive (kixforms.dll) to the appropriate folder for your system.
  • You need to register the KiXforms DLL now. One of the easiest methods is to simply click on the START menu then click on the RUN command and type in the following command: REGSVR32.EXE KIXFORMS.DLL and click OK. As long as there are no path issues on the system this should now produce a dialog box indicating successful registration of KiXforms:

You’re now ready to start using KiXforms to create your own script forms. Please continue reading the Getting Started section to learn how to start using KiXforms.

UPGRADING

In order to prevent any possible issues that might be difficult to track down, it is best to un-register the KiXforms DLL before replacing it with a newer version:

  • Click on the START menu, then click on the RUN command and type in the following command REGSVR32.EXE /U KIXFORMS.DLL
  • This should now produce a dialog box indicating that KiXforms was successfully unregistered:

Now proceed with installing KiXforms as described above. The only difference is that you will now overwrite the old (kixforms.dll) with the new version.

TROUBLESHOOTING INSTALL ISSUES

  • Remember that you must be a Local Administrator in order to install KiXforms. Please verify that your currently logged on account has LOCAL ADMINISTRATOR rights.
  • Ensure that the %WINDIR%\SYSTEM or %WINDIR%\SYSTEM32 folder is in the path.
  • Verify that the KIXFORMS.DLL file you extracted from the archive is located in the SYSTEM or SYSTEM32 folder.
  • Verify that the REGSVR32.EXE file is in the path (it should reside in the SYSTEM or SYSTEM32 folder as well).
  • Remember that KiXforms must be used in conjunction with KiXtart v4.02 or newer. Make sure you have KIX32.EXE or WKIX32.EXE in your path or in the folder where you run your scripts from. On Windows 9x you may need to be running the KXRPC service as well as have other DLL files installed. Please read the KiXtart manual for further information about installing and using KiXtart.
  • Download locations for KiXtart: http://www.kixtart.org/ or http://www.scriptlogic.com/

If any of the above trouble shooting recommendations fail to resolve your installation issue, please visit the KiXforms BBS or the KiXtart.org BBS to seek further advice.


Deprecated Functions

Member | New Member
Caption | Text
CommandButton | Button
Frame | GroupBox
MaxButton | MaximizeBox
MinButton | MinimizeBox
MousePointer | Cursor
MsgBox | MessageBox
OnDblClick | OnDoubleClick
OptionButton | RadioButton
RGB | Color
ScaleHeight | ClientHeight
ScaleWidth | ClientWidth
SelLength | SelectionLength
SelStart | SelectionStart
SelText | SelectedText
SysMenu | ControlBox
ToggleStyle | ToolButton.Style
ToolTip | ToolTipText
Slider | TrackBar


Quick Start

Writing a Hello World Form

Getting started with KiXforms is easy. The following example displays a top level window (called a form) and sets the caption bar text to "Hello World".

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Form.Text = "Hello World"

$Form.Show

While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 0


A Quick Tour

Overview

This section takes you through the code for a small demo script. Future articles will provide full explanations of the topics introduced in this section. It also provides a bigger, more realistic example that you can use to expand and test your Kixforms knowledge. You can find the whole listing at the bottom of this page.

The demo script brings up a window that looks like this:

Each time the user clicks the button, the label is updated.

The demo accomplishes the following tasks:

  • Importing the System namespace

  • Setting up the top-level container

  • Setting up buttons and labels

  • Handling events

Importing the System namespace

The following line imports the System (root) namespace:

$System = CreateObject("Kixtart.System")

Setting Up the Top-Level Container

Every script that presents a GUI contains at least one top-level container. The top-level container in Kixforms is called the Form object. Each form object implements a single main window. The demo script has only one top-level form. When the user closes the form, the script exits. Here is the code that sets up and shows the form:

$Form = $System.Form()

$Form.Text = "Kixforms Demo"
$Form.Width = 300
$Form.Height = 130
$Form.FontName = "Verdana"
$Form.FontSize = 12

; create the controls that make up the form...

$Form.Show()

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Setting Up Buttons and Labels

Like most GUIs, the demo GUI contains a button and a label. (Unlike most GUIs, that's about all that demo contains). Here's the code that initializes the button:

$Button1 = $Form.Controls.Add("Button")
$Button1.Left = 35
$Button1.Top = 50
$Button1.Width = 230
$Button1.Height = 40
$Button1.Text = "I'm a Kixforms button!"
$Button1.OnClick = "Button1_Click()"

The first line creates a button and adds it to the form. The next four lines set the size and location of the button. The second last line sets the text displayed on the button to "I'm a Kixforms button!". The last line registers an event handler for the button click event. You'll see the event-handling code for this script later under Handling Events.

Here's the code that initializes and positions the label:

$Label1 = $Form.Controls.Add("Label")
$Label1.Left = 35
$Label1.Top = 10
$Label1.Width = 270
$Label1.Height = 30
$Label1.Text = $ClickText + $ClickCount

The preceding code is relatively straightforward, except the last line. The last line sets the label text by combining the values of two values. $ClickPrefix contains the string "Number of button clicks: " and $ClickCount contains the count of button clicks.

Handling Events

The demo example contains one event handler to handle button clicks. Here is the event-handling code:

$Button1.OnClick = "Button1_Click()"

$Form.Show()

While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Function Button1_Click()

 $ClickCount = $ClickCount + 1
 $Label1.Text = $ClickPrefix + $ClickCount

EndFunction

The function call that handles button clicks is assigned to the OnClick event property of the button. The form is then shown and the DoEvents loop is entered. While the form is visible, event code returned by DoEvents is run through the Execute function. The result is that when the button clicked, the Button1_Click function is called. The Button1_Click function simply increments the click counter and updates the label text. When Button1_Click finishes, control is returned to the DoEvents loop.

Complete Listing

Break On

$System = CreateObject("Kixtart.System")

$ClickText = "Number of button clicks: "
$ClickCount = 0

$Form = $System.Form()
$Form.Text = "Kixforms Demo"
$Form.Width = 300
$Form.Height = 130
$Form.FontName = "Verdana"
$Form.FontSize = 12

$Label1 = $Form.Controls.Add("Label")
$Label1.Left = 35
$Label1.Top = 10
$Label1.Width = 270
$Label1.Height = 30
$Label1.Text = $ClickText + $ClickCount

$Button1 = $Form.Controls.Add("Button")
$Button1.Left = 35
$Button1.Top = 50
$Button1.Width = 230
$Button1.Height = 40
$Button1.Text = "I'm a Kixforms button!"
$Button1.OnClick = "Button1_Click()"

$Form.Center()
$Form.Show()

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function Button1_Click()

 $ClickCount = $ClickCount + 1
 $Label1.Text = $ClickText + $ClickCount

EndFunction


Object Oriented Scripting

Overview

Kixforms is an object-oriented extension to the Kixtart scripting language and is based on objects, rather than being class-based. Because of this difference, it can be less apparent how one creates hierarchies of objects, and to have inheritance of properties and their values. This aritcle attempts to clarify the situation.

This article assumes that you are already familiar with Kixforms and the Kixtart scripting language, and that you have used both to create scripts.

Class-Based vs. Prototype-Based Languages

Class-based object-oriented languages, such as Java and C++, are founded on the concept of two distinct entities: classes and instances. A class defines all of the properties that characterize a certain set of objects. A class is an abstract thing, rather than any particular member of the set of objects it describes. For example, the Employee class could represent the set of all employees. An instance, on the other hand, is the instantiation of a class; that is, one of its members. For example, Victoria could be an instance of the Employee class, representing a particular individual as an employee. An instance has exactly the properties of its parent class (no more, no less).

A prototype-based language does not make this distinction: it simply has objects. A prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object. An object can specify its own properties when you create it at run time. In addition, an object can be associated as the prototype for another object, allowing the second object to share the first object's properties.

It is important to note that Kixtart is not an object-oriented scripting language. There is no built-in support for classes or objects or even prototype-based objects. However Kixtart does support the Component Object Model (COM) and the ability to create and use external objects via COM Automation. Kixforms extends the paradigm by allowing you to create a prototypical (template) object that can be customized (extended) from within Kixtart.

Defining a Class

In class-based languages, you define a class in a separate class definition. In that definition you can specify special methods, called constructors, to create instances of the class. A constructor method can specify initial values for the instance's properties and perform other processing appropriate at creation time. You use the new operator in association with the constructor method to create class instances.

Kixtart/Kixforms follows a similar model, but does not have a class definition separate from the constructor. Instead, you define a constructor function to create objects with a particular initial set of properties and values. Any function can be used as a constructor.

Subclasses and Inheritance

In a class-based language, you create a hierarchy of classes through the class definitions. In a class definition, you can specify that the new class is a subclass of an already existing class. The subclass inherits all the properties of the superclass and additionally can add new properties or modify the inherited ones. For example, assume the Employee class includes only the name and department properties, and Manager is a subclass of Employee that adds the reports property. In this case, an instance of the Manager class would have all three properties: name, department, and reports.

Kixtart/Kixforms implements inheritance by allowing you to associate a prototypical object with any constructor function. So, you can create exactly the Employee- Manager example, but you use slightly different terminology. First you define the Employee constructor function, specifying the name and department properties. Next, you define the Manager constructor function and assign a new Employee object as the prototype for the Manager constructor function. Finally, you specifying the reports property. Then, when you create a new Manager, it inherits the name and department properties from the Employee object.

Dynamic (Expando) Properties

In class-based languages, you typically create a class at compile time and then you instantiate instances of the class either at compile time or at run time. You cannot change the number or the type of properties of a class after you define the class. With Kixforms however, at run time you can add properties to an object. If you add a property to an object that is used as the prototype for a set of objects, the objects for which it is the prototype also get the new property.

The Employee Example

The remainder of this section uses a simple employee hierarchy described using the following objects:

  • Employee has the properties name (whose value defaults to the empty string) and department (whose value defaults to "general").

  • Manager is based on Employee. It adds the reports property (whose value defaults to an empty string, intended to have an array of Employee objects as its value).

  • WorkerBee is also based on Employee. It adds the projects property (whose value defaults to an empty string, intended to have an array of strings as its value).

  • SalesPerson is based on WorkerBee. It adds the quota property (whose value defaults to 100). It also overrides the department property with the value "sales", indicating that all salespersons are in the same department.

  • Engineer is based on WorkerBee. It adds the machine property (whose value defaults to the empty string) and also overrides the department property with the value "engineering".

Creating the Hierarchy

There are several ways to define appropriate constructor functions to implement the Employee hierarchy. How you choose to define them depends largely on what you want to be able to do in your application. This section shows how to use very simple (and comparatively inflexible) definitions to demonstrate how to get the inheritance to work. In these definitions, you cannot specify any property values when you create an object. The newly-created object simply gets the default values, which you can change at a later time. The following code examples demonstrate how the inheritance occurs.

function Employee()
 $Employee = $System.Object()
 $Employee.name = ""
 $Employee.department = "general"
endfunction

The Manager and WorkerBee definitions show the difference in how to specify the next object higher in the inheritance chain. You add a prototypical instance as the value of the constructor function. Then initialize the properties that are unique to the object:

function Manager()
 $Manager = Employee()
 $Manager.reports = ""
endfunction

function WorkerBee()
 $WorkerBee = Employee()
 $WorkerBee.projects = ""
endfunction

The Engineer and SalesPerson definitions create objects that descend from WorkerBee and hence from Employee. An object of these types has properties of all the objects above it in the chain. In addition, these definitions override the inherited value of the department property with new values specific to the objects.

Function SalesPerson()
 $SalesPerson = WorkerBee()
 $SalesPerson.department = "Sales"
 $SalesPerson.Quota = 100
EndFunction

Function Engineer()
 $Engineer = WorkerBee()
 $Engineer.department = "Engineering"
 $Engineer.machine = ""
EndFunction

Using these definitions, you can create instances of these objects that get the default values for their properties. The following example illustrates using these definitions to create new objects and shows the property values for the new objects:

$jim = Employee()
$jim.name is ""
$jim.department is "general"

$sally = Manager()
$sally.name is ""
$sally.department is "general"
$sally.reports is ""

$mark = WorkerBee()
$mark.name is ""
$mark.department is "general"
$mark.projects is ""

$fred = SalesPerson()
$fred.name is ""
$fred.department is "sales"
$fred.projects is ""
$fred.quota is 100

$jane = Engineer()
$jane.name is ""
$jane.department is "engineering"
$jane.projects is ""
$jane.machine is ""

The term instance has a specific technical meaning in class-based languages. In these languages, an instance is an individual member of a class and is fundamentally different from a class.

In Kixforms, "instance" does not have this technical meaning because Kixforms does not have this difference between classes and instances. However, in talking about Kixforms, "instance" can be used informally to mean an object created using a particular constructor function. So, in the previous example, you could informally say that Jane is an instance of Engineer. Similarly, although the terms parent, child, ancestor, and descendant do not have formal meanings in Kixforms; you can use them informally to refer to objects higher or lower in the prototype chain.

Inheriting Properties

This section discusses how objects inherit properties from other objects in the prototype chain and what happens when you add a property at run time. Suppose you create the mark object as a WorkerBee as shown in the following statement:

$mark = WorkerBee()

When Kixtart processes the WorkerBee constructor function, it first creates a new generic Employee object and assigns this object as the return value of the WorkerBee contructor. The constructor function then explicitly sets the value of the projects property. Once these properties are set, Kixtart returns the new object and the assignment statement sets the variable $mark to that object.

function WorkerBee()
 $WorkerBee = Employee()
 $WorkerBee.projects = ""
endfunction

This process does not explicitly put values in the mark object (local values) for the properties mark inherits from the prototype chain. The mark object is simply an amalgamation of all the properties it inherits through it's prototype chain. When you ask for the value of a property, Kixforms checks to see if the property exists in that object. If it does, the value is returned. If the property does not exist, an empty reference is returned. In this way, the mark object has the following properties and values:

$mark.name is ""
$mark.department is "general"
$mark.projects is ""

Because these constructors do not let you supply instance-specific values, this information is generic. The property values are the default ones shared by all new objects created from WorkerBee. You can, of course, change the values of any of these properties. So, you could give specific information for mark as follows:

$mark.name = "Mark Smith"
$mark.department = "admin"
$mark.projects = "navigator","explorer"

Adding Properties

You can add properties to an object at run time. You are not constrained to use only the properties provided by the constructor function. To add a property that is specific to a single object, you assign a value to the object, as follows:

$mark.bonus = 3000

Now, the mark object has a bonus property, but no other WorkerBee has this property.

If you add a new property to an object that is being used as the prototype for a constructor function, you add that property to all objects that subsequently inherit from that prototype. For example, you can add a specialty property to all employees with the following statement:

function Employee()
 $Employee = $System.Object()
 $Employee.name = ""
 $Employee.department = "general"
 $Employee.specialty = "none"
endfunction

In the future, any object that derives from the Employee object also has the specialty property with the value of "none". The following example shows the effect of adding this property to the Employee prototype and then overriding it in the Engineer prototype.

function Engineer()
 $Engineer = WorkerBee()
 $Engineer.department = "engineering"
 $Engineer.machine = ""
 $Engineer.specialty = "code"
endfunction

More Flexible Constructors

The constructor functions shown so far do not let you specify property values when you create an instance. As with other object-oriented langauges, you can provide arguments to constructors to initialize property values for instances. The following example shows one way to do this:

function Engineer($machine)
 $Engineer = WorkerBee()
 $Engineer.department = "engineering"
 $Engineer.machine = $machine
endfunction

An even more flexible strategy allows for optional parameters to be passed as initial values to the constructor function, for example:

function Engineer(optional $machine)
 $Engineer = WorkerBee()
 $Engineer.department = "engineering"
 $Engineer.machine = iif($machine, $machine, "")
endfunction

This example uses a special idiom for setting default values:

$Engineer.machine = iif($machine, $machine, "")

The IIF function evaluates its first argument. If that argument evaluates true, the function returns the value of its second argument. Otherwise, the function returns the value of its third argument. Therefore, this line of code tests to see if $machine has a useful value for the machine property. If it does, it sets machine property to that value. Otherwise, it sets the machine property to the empty string. This topic uses this idiom for brevity; however, it can be puzzling at first glance.

With these definitions, when you create an instance of an object, you can specify values for the locally defined properties. For example, you can now use either of the following statements to create a new Engineer:

$jane = Engineer()
$jane = Engineer( "lathe" )

Jane's properties are now:

$jane.name is ""
$jane.department is "general"
$jane.projects is ""
$jane.machine is "lathe"

Notice that with these definitions, you cannot specify an initial value for an inherited property such as name. If you want to specify an initial value for inherited properties you need to add more code to the constructor function:

function Engineer( optional $name, optional $machine )
 $Engineer = WorkerBee()
 $Engineer.name = iif( $name, $name, "" )
 $Engineer.department = "engineering"
 $Engineer.machine = iif( $machine, $machine, "" )
endfunction

However, a more modular and object-oriented approach is to allow for optional constructor properties throughout the prototype chain, then pass any base properties directly on to the base prototype in the constructor. This will allow for assigning defaults and any special processing that must occur at the lower levels. The following example shows these new definitions:

function Employee( optional $name, optional $department )
 $Employee = $System.Object()
 $Employee.name = iif( $name, $name, "" )
 $Employee.department = iif( $department, $department, "" )
endfunction

function WorkerBee( optional $name, optional $department, optional $projects )
 $WorkerBee = Employee($name, $department)
 $WorkerBee.projects = iif($projects, $projects, "")
endfunction

function Engineer(optional $name, optional $projects, optional $machine)
 $Engineer = WorkerBee($name, "engineering", $projects)
 $Engineer.machine = iif($machine, $machine, "")
endfunction

Let's look at one of these definitions in detail. Suppose you create a new Engineer object as follows:

$jane = Engineer("Doe, Jane", "kixtart | javascript", "belau")

Refering back to the code, the Engineer constructor calls its WorkerBee base constructor, passing as its arguments two of the arguments passed to the constructor ("Doe, Jane" and "kixtart | javascript") and also the string "engineering". Explicitly using "engineering" in the constructor indicates that all Engineer objects have the same value for the inherited department property, and this value overrides the value inherited from Employee.

The WorkerBee constructor in turn passes the "Doe, Jane" and "engineering" arguments to the Employee constructor function. Upon return from the Employee constructor function, the WorkerBee function uses the remaining argument to set the projects property.

Upon return from the base constructor, the Engineer constructor initializes the object's machine property to "belau".

Upon return from the constructor, Kixtart assigns the new object to the $jane variable.


Bitmap Object

Description

Encapsulates a bitmap, which consists of the pixel data for a graphics image and its attributes. A Bitmap object is an object used to work with images defined by pixel data.


Bitmap Constructor

Description

Initializes a new instance of the Bitmap class.

Syntax

object.Bitmap(filename)

object.Bitmap(width, height)

object.Bitmap(size)

Parameters

filename
 | A string expression specifying the name of the bitmap file
width
 | The width, in pixels, of the new bitmap
height
 | The height, in pixels, of the new bitmap
size
 | A Size object representing the size of the new bitmap

Return Value

A Bitmap object.

Example

$Bitmap = $System.Bitmap("c:\myimage.jpg")

$Panel1.BackgroundImage = $System.Bitmap("myimage.bmp")

See Also

Applies To: System


Bitmap Properties

Properties

Height
Width


Bitmap Methods

Methods

FromBase64String


Button Control

Description

Represents a Windows button control.

Remarks

Use the Button control to begin, interrupt, or end a process. To display text on a Button control, set its Text property. A user can always choose a Button by clicking it. To allow the user to choose it by pressing ENTER, set the Default property to True. To allow the user to choose the button by pressing ESC, set the Cancel property of the Button to True.


Button Constructor

Description

Creates a new Button control.

Syntax

object.Controls.Add("Button")

Example

$Button = $Form.Controls.Add("Button")

See Also

Applies To: ControlCollection


Button Properties

Properties

Anchor
Bottom
Bounds
Cancel
ClientHeight
ClientSize
ClientWidth
Cursor
Default
DialogResult
Dock
Enabled
FlatStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
Height
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Name
Right
Size
TabStop
Tag
Text
TextAlign
Top
ToolTipText
Visible
Width


Button Methods

Methods

Center
Hide
Refresh
SetFocus
Show


Button Events

Events

OnClick
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


CheckBox Control

Description

Represents a Windows check box control.

Remarks

Use a CheckBox to give the user an option, such as true/false or yes/no. The check box control can display an image or text but not both.

CheckBox and RadioButton controls have a similar function: they allow the user to choose from a list of options. CheckBox controls let the user pick a combination of options. In contrast, RadioButton controls allow a user to choose from mutually exclusive options.

To display text next to the CheckBox, set the Text property. To get or set whether the CheckBox is checked, use the Checked property. The Appearance property determines whether the check box appears as a typical check box or as a button. The FlatStyle property determines whether the check box is flat or three dimensional.

The ThreeState property determines whether the control supports two or three states. Use the Checked property to get or set the value of a two-state check box control and use the CheckState property to get or set the value of a three-state check box control. Note: If the ThreeState property is set to true, the Checked property will return true for either a checked or indeterminate state.


CheckBox Constructor

Description

Creates a new CheckBox control.

Syntax

object.Controls.Add("CheckBox")

Example

$CheckBox = $Form.Controls.Add("CheckBox")

See Also

Applies To: ControlCollection


CheckBox Properties

Properties

Anchor
Appearance
BackColor
Bottom
Bounds
Cancel
CheckAlign
Checked
CheckState
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
FlatStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Name
Right
Size
TabStop
Tag
Text
ThreeState
Top
ToolTipText
Visible
Width


CheckBox Methods

Methods

Center
Hide
Refresh
SetFocus
Show


CheckBox Events

Events

OnClick
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


Collection Object

Description

An ordered set of items that can be referred to as a unit.

Remarks

The Collection object provides a convenient way to refer to a related group of items as a single object. The items, or members, in a collection need only be related by the fact that they exist in the collection. Members of a collection do not have to share the same data type.

You can create a collection the same way you create other objects. For example:

$Collection = $System.Collection()

Once you have created a collection, you can add members with the Add method and remove them with the Remove method. You can return specific members from the collection with the Item method, and iterate through the entire collection with the For Each...Next statement.


Collection Constructor

Description

Creates a new Collection object.

Syntax

object.Collection()

Example

$Collection = $System.Collection()

See Also:

Applies To: System


Collection Properties

Properties

Count
Item


Collection Methods

Methods

Add
Remove


ColorDialog Object

Description

Represents a common dialog box that displays available colors along with controls that allow the user to define custom colors.

Remarks

Use Color to get or set the color selected by the user. Use ShowDialog to show the dialog box to the user.

ColorDialog is a modal dialog box; therefore, when shown, it blocks the rest of the script until the user has chosen a color. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box.

Example

See ColorDialog example.


ColorDialog Constructor

Description

Creates a new ColorDialog object.

Syntax

ColorDialog()

Example

$ColorDialog = $System.ColorDialog()

See Also

Applies To: System


ColorDialog Properties

Properties

Color


ColorDialog Methods

Methods

ShowDialog


Column Object

Description

Represents a single column in a control. The Column object is a member of the Columns collection. The Columns collection contains all the Column objects in a single control.

Remarks

Use Columns(index), where index is the column index number, to return a single Column object from the collection. The following example sets the heading text in column one to a new value.

$ListView.Columns(1).Text = "Name"


Column Properties

Properties

Index
Width
Text
TextAlign


Columns Collection

Description

A collection of all the columns in the specified control. Each column is represented by a Column object.

Remarks

Use the Columns property to return a reference to the Columns collection. The following example sets the width of all columns to 100 pixels.

For Each $Column In $ListView.Columns
 $Column.Width = 100
Next

Use Columns(index), where index is the column index number, to return a single Column object from the collection. The following example sets the heading text in column one to a new value.

$ListView.Columns(1).Text = "Name"

Columns are indexed from left to right in the control. Columns(0) is the leftmost column, and Columns(Columns.Count-1) is the rightmost column. The following example removes the last column in the control.

$ListView.Columns.Remove($ListView.Columns.Count - 1)

Use the Add method to create a new Column and add it to the collection. The following example creates a new column labeled "Amount" that is 100 pixels wide and right aligned.

$Column = $ListView.Columns.Add("Amount",100,1)

If you want to insert a column at a specific location, use the Insert method. To remove a column from the collection, use the Remove method. The Clear method allows you to remove all columns from the collection instead of using the Remove method to remove a single column at a time.


Columns Properties

Properties

Count


Columns Methods

Methods

Add
Clear
Insert
Remove


ComboBox Control

Description

Represents a Windows combo box control.

Remarks

A ComboBox displays an editing field combined with a ListBox, allowing the user to select from the list or to enter new text. The default behavour of ComboBox displays an edit field with a hidden drop-down list.

The DropDownStyle property determines the style of combo box to display. You can enter a value that allows for a simple drop-down, where the list always displays, a drop-down list box, where the text portion is not editable and you must select an arrow to view the drop-down list box, or the default drop-down list box, where the text portion is editable and the user must press the arrow key to view the list. To always display a list that the user cannot edit, use a ListBox control.


ComboBox Constructor

Description

Creates a new ComboBox control.

Syntax

object.Controls.Add("ComboBox")

Example

$ComboBox = $Form.Controls.Add("ComboBox")

See Also

Applies To: ControlCollection


ComboBox Properties

Properties

Anchor
BackColor
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
DropDownStyle
DropDownWidth
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
ItemHeight
KeyCode
Left
List
ListCount
Location
MaxLength
MouseButton
MouseX
MouseY
Right
SelectedIndex
SelectedText
SelectionLength
SelectionStart
Size
Sorted
TabStop
Tag
Text
Top
Visible
Width


ComboBox Methods

Methods

AddItem
Clear
Center
Hide
Refresh
RemoveItem
SetFocus
Show


ComboBox Events

Events

OnClick
OnGotFocus
OnKeyDown
OnLostFocus
OnSelectedIndexChanged
OnTextChanged


ContextMenu Object

Description

Represents a shortcut menu.

For a list of all members of this type, see ContextMenu Members.

Remarks

The ContextMenu class represents shortcut menus that can be displayed when the user clicks the right mouse button over a control. Shortcut menus are typically used to combine different menu items from a MainMenu of a form that are useful for the user given the context of the application. For example, you can use a shortcut menu assigned to a TextBox control to provide menu items for changing the font of the text, finding text within the control, or Clipboard features for copying and pasting text. You can also display new MenuItem objects in a shortcut menu that are not located within a MainMenu to provide situation specific commands that are not appropriate for the MainMenu to display.

Typically, a shortcut menu is displayed when a user clicks the right mouse button over a control itself. Visible controls have a ContextMenu property that binds the ContextMenu class to the control that displays the shortcut menu. More than one control can use a ContextMenu.

Example

The following example creates a Form and a ContextMenu. When the form is right-clicked, the ContextMenu is displayed. If the user clicks "Exit", the script exits.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()
$Form.OnRightMouseUp = "RightMouseUp()"

$ContextMenu = $System.ContextMenu()

$ExitMenu = $ContextMenu.MenuItems.Add("Exit")
$ExitMenu.OnClick = "ExitClick()"

$Form.Center
$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function RightMouseUp()

 $= $ContextMenu.Show($Form, $Form.MouseX, $Form.MouseY)

EndFunction

Function ExitClick()

 Quit()

EndFunction


ContextMenu Constructor

Summary:

Returns a new instance of the ContextMenu class.

Syntax:

object.ContextMenu()

Remarks

Once you have used this version of the constructor, you can add menu items to the ContextMenu by using the Add method of the MenuItemCollection class. You can access the MenuItemCollection through the MenuItems property.

See Also

Applies To: System


ContextMenu Properties

Properties

ImageList
MenuItems


ContextMenu Methods

Methods

Show


ControlCollection Object

Description

A collection of child controls contained in a specified control.

Remarks

Use the Controls property to return a reference to the ControlCollection.

Each control in the ControlCollection of an object has a unique index whose value can be either an integer or a string. The index value for the first control in the collection is 0; the value for the second control is 1, and so on. This value indicates the order in which controls were added to the collection.

If the index is a string, it represents the name of the control. The Name property of a control also specifies a control's name. You can use the ControlCollection to enumerate or count individual controls, and to set their properties. For example, you can enumerate the ControlCollection of a particular form and set the Height property of each control to a specified value.

Examples

The following example creates a new button and adds it to a form.

$Button = $Form.Controls.Add("Button")

The following example returns a control by index number.

$Form.Controls(0).Text = "Click Me!"

The following example returns a control by name.

$Form.Controls("Button1").Text = "Click Me!"


ControlCollection Properties

Properties

Count
Item


ControlCollection Methods

Methods

Add


Environment Object

Description

Provides information about, and means to manipulate, the current environment and platform.

Remarks

Use the Environment property to return a reference to the Environment object.


Environment Properties

Properties

CommandLine
LastUserInput


EventArgs Object

Summary:

An object that provides additional data for events.


EventArgs Properties

Properties

Button
Cancel
Node
X
Y


FolderBrowserDialog Object

Description

Represents a common dialog box that allows the user to choose a folder.

Remarks

This class provides a way to prompt the user to browse, create, and eventually select a folder. Use this class when you only want to allow the user to select folders, not files. Browsing of the folders is done through a tree control. Only folders from the file system can be selected. Virtual folders cannot.

Typically, after creating a new FolderBrowserDialog, you set the RootFolder to the location from which to start browsing. Optionally, you can set the SelectedPath to an absolute path of a subfolder of RootFolder that will initially be selected. You can also optionally set the Description property to provide additional instructions to the user. Finally, call the ShowDialog method to display the dialog box to the user. When the dialog box is closed and the dialog result from ShowDialog is OK, the SelectedPath will be a string containing the path to the selected folder.

You can use the ShowNewFolderButton property to control if the user is able to create new folders via the New Folder button.

FolderBrowserDialog is a modal dialog box; therefore, when shown, it blocks the rest of the script until the user has chosen a folder. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box.


FolderBrowserDialog Constructor

Description

Creates a new FolderBrowserDialog object.

Syntax

FolderBrowserDialog()

Example

$FolderBrowserDialog = $System.FolderBrowserDialog()

See Also

Applies To: System


FolderBrowserDialog Properties

Properties

Description
RootFolder
SelectedPath
ShowNewFolderButton


FolderBrowserDialog Methods

Methods

ShowDialog


Font Class

Description

Encapsulates a Win32 font, which is used to draw text on video displays and other output devices.

Remarks

The Font object encapsulates a Windows font and provides the member functions for manipulating that font. To explicitly use a Font object, construct the object and assign the Font to the appropriate object's Font property.


Font Constructor

Description

Creates a new Font object.

Syntax

object.Font(face, size, style)

Parameters

face

An optional string expression that evaluates to the face name of the new font.

size

An optional numeric expression specifying the point size of the new font.

style

An optional bitwise combination of the FontStyle values specifying the style of the new font. The default is FontStyle.Normal.

Example

$Font = $System.Font ( "Verdana", 8.25, $System.FontStyle.Bold )

See Also

Applies To: System


Font Properties

Properties

Bold
Name
Size
StrikeOut
Style
Underline


FontDialog Object

Description

Represents a common dialog box that displays a list of fonts that are currently installed on the system.

Remarks

Use the Font property to get or set the font selected by the user. Use ShowDialog to show the dialog box to the user.

FontDialog is a modal dialog box; therefore, when shown, it blocks the rest of the script until the user has chosen a font. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box.

Example

See FontDialog example.


FontDialog Constructor

Description

Creates a new FontDialog object.

Syntax

FontDialog()

Example

$FontDialog = $System.FontDialog()

See Also

Applies To: System


FontDialog Properties

Properties

Font


FontDialog Methods

Methods

ShowDialog


Form Object

Description

Represents a window or dialog box that makes up an application's user interface.

Remarks

The Form object supports dynamic (expando) properties. However please note that you cannot use existing property, method or event names as expando names. Try to devise a unique naming scheme for expandos to avoid name conflicts today and in the future.

Example

The following example creates a form and calls the Show method to display it. The example sets the Resizable, MinimizeBox and MaximizeBox properties to change the appearance and functionality of the form to a dialog box. The example also creates a button that when clicked, closes the form.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Form.Text = "My Form"
$Form.MaximizeBox = "False"
$Form.MinimizeBox = "False"
$Form.Resizable = 0

; Create a button ...

$Button1 = $Form.Controls.Add("Button")
$Button1.Text = "OK"
$Button1.Center
$Button1.OnClick = "Button1_Click()"

; Center and show the form...

$Form.Center
$Form.Show()
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function Button1_Click()

 $Form.Hide

EndFunction


Form Constructor

Description

Creates a new Form object.

Syntax

object.Form( owner )

Parameters

owner - An optional reference to a Form that is to be the owner of this form.

Example

$Form1 = $System.Form()

$Form2 = $System.Form($Form1)

Remarks

When a form is owned by another form, it is minimized and closed with the owner form. For example, if Form2 is owned by Form1, if Form1 is closed or minimized, Form2 is also closed or minimized. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not disappear when the owner form is selected.

See Also

Applies To: System


Form Properties

Properties

ActiveControl
BackColor
BackgroundImage
Bottom
Bounds
Build
ClientHeight
ClientSize
ClientWidth
ControlBox
Controls
Cursor
DockPadding
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
FormBorderStyle
Height
Icon
KeyCode
Left
Location
MaximizeBox
MaximumSize
Menu
MinimizeBox
MinimumSize
MouseButton
MouseX
MouseY
Opacity
Resizable
Right
Size
ShowInTaskBar
SizeGripStyle
StartPosition
TabStop
Tag
Text
ToolTipText
Top
TopMost
Version
Visible
Width
WindowState


Form Methods

Methods

Activate
Center
DoEvents
Hide
Refresh
SetFocus
Show
ShowDialog
ShowModal


Form Events

Events

OnAbout
OnActivate
OnClick
OnDeactivate
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnMove
OnResize


GroupBox Control

Description

Represents a Windows group box.

Remarks

The GroupBox displays a frame around a group of controls with or without a caption. Use a GroupBox to logically group a collection of controls on a form. The group box is a container control that can be used to define groups of controls.

The typical use for a group box is to contain a logical group of RadioButton controls. If you have two group boxes, which each contain several radio buttons, both groups of buttons would be mutually exclusive and set two individual option values.

The GroupBox object supports dynamic (expando) properties. However please note that you cannot use existing property, method or event names as expando names. Try to devise a unique naming scheme for expandos to avoid name conflicts today and in the future.


GroupBox Constructor

Description

Creates a new GroupBox control.

Syntax

object.Controls.Add("GroupBox")

Example

$GroupBox = $Form.Controls.Add("GroupBox")

See Also

Applies To: ControlCollection


GroupBox Properties

Properties

Anchor
BackColor
Bottom
BorderStyle
Bounds
ClientHeight
ClientSize
ClientWidth
Controls
Dock
DockPadding
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Left
Location
Right
Size
Tag
Text
TextAlign
Top
Visible
Width


GroupBox Methods

Methods

Center
Hide
Refresh
SetFocus
Show


HyperLink Control

Description

Represents a Windows label control that can display hyperlinks.

Remarks

The HyperLink control is similar to a Label control with the exception that it can display a hyperlink. Use the Text property to specify the hyperlink text shown to the user. Use the Value property to specify the URL to invoke when the hyperlink is clicked.

Example

The following example creates a form with a hyperlink. When the hyperlink is clicked, the URL is invoked.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$HyperLink = $Form.Controls.HyperLink
$HyperLink.Text = "KiXtart Bulletin Board"
$HyperLink.Value = "http://www.kixtart.org"
$HyperLink.Center

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1


HyperLink Method (Controls Collection)

Description

Creates a new HyperLink control.

Syntax

object.Controls.Add("HyperLink")

Example

$HyperLink = $Form.Controls.Add("HyperLink")

See Also

Applies To: ControlCollection


HyperLink Properties

Properties

Anchor
BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Right
Size
TabStop
Tag
Text
Top
ToolTipText
Value
Visible
Width


HyperLink Methods

Methods

Center
Hide
Refresh
SetFocus
Show


HyperLink Events

Events

OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


Icon Object

Description

Represents a Windows icon, which is a small bitmap image used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.


Icon Constructor

Description

Initializes a new instance of the Icon class and attempts to find a version of the icon that matches the requested size.

Syntax

object.Icon( filename, width, height )

Parameters

filename
 | A string expression that evaluates to the the fully qualified path of an ICO file.
width
 | Optional. A numeric expression specifying the width of the new icon.
height
 | Optional. A numeric expression specifying the height of the new icon.

Return Value

An Icon object.

Example

$Icon = $System.Icon( "myicon.ico" )

See Also

Applies To: System


Icon Properties

Properties

Height
Width


ImageList Object

Description

Provides methods to manage a collection of images.

Remarks

ImageList is typically used by other controls, such as ListView, TreeView, or ToolBar. You can add bitmaps and icons to the ImageList, and the other controls are able to use the images as they require.


ImageList Constructor

Description

Creates a new ImageList object.

Syntax

ImageList()

Example

$ImageList = $System.ImageList()

See Also

Applies To: System


ImageList Properties

Properties

ColorDepth
Images
ImageSize
TransparentColor


Images Collection

Description

Encapsulates the collection of images in an ImageList control.

Remarks

This is used to manage the images in the ImageList programmatically, providing methods to add and remove image objects.


Images Properties

Properties

Count


Images Methods

Methods

Add
AddStrip
Clear


InputBox Object

Description

Provides static methods for displaying an input box.

Constructor

System.InputBox

Remarks

InputBox is a modal dialog; therefore when shown, it blocks the rest of the script until the user has chosen an action. When a dialog is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog.


InputBox Method

Summary:

Creates a new InputBox object.

Syntax:

object.InputBox()

Example:

$InputBox = $System.InputBox()

See Also

Applies To: System


InputBox Methods

Methods

Show


Item Object

Description

Represents a single item in a control. The Item object is a member of the Items collection. The Items collection contains all the Item objects in a single control.

Remarks

Some of the properties of the Item class provide ways to change the display of the item in the control it is associated with. The Text property allows you to change the text displayed for the item. The ImageIndex property allows you to specify the image to load from the ImageList that is assigned to the control.

Items can display any number of subitems when the View property of the associated control is set to Details and columns are defined in the Columns collection of the control. You can access subitems of an item by referencing the SubItems collection. Use the SubItems property to return a reference to the SubItems collection and its members.


Item Properties

Properties

Focused
ImageIndex
Index
Selected
SubItems
Tag
Text


Item Methods

Methods

Remove


Kixforms Class Library

Items Collection


Items Properties

Properties

Count


Items Methods

Methods

Add
Clear
Insert
Remove


Kixforms Class Library

Label Control


Label Constructor

Description

Creates a new Label control.

Syntax

object.Controls.Add("Label")

Example

$Label = $Form.Controls.Add("Label")

See Also

Applies To: ControlCollection


Label Properties

Properties

Anchor
BackColor
BackgroundImage
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Image
ImageAlign
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Right
Size
TabStop
Tag
Text
TextAlign
Top
ToolTipText
Visible
Width


Label Methods

Methods

Center
Hide
Refresh
SetFocus
Show


Label Events

Events

OnClick
OnDoubleClick
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


ListBox Control

Description

Represents a Windows list box control. The ListBox control enables you to display a list of items to the user that the user can select by clicking.


ListBox Constructor

Description

Creates a new ListBox control.

Syntax

object.Controls.Add("ListBox")

Example

$ListBox = $Form.Controls.Add("ListBox")

See Also

Applies To: ControlCollection


ListBox Properties

Properties

Anchor
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
Height
KeyCode
Left
List
ListCount
ListIndex
ListWidth
Location
MouseButton
MouseX
MouseY
Right
Size
Sorted
TabStop
Tag
Text
Top
ToolTipText
Visible
Width


ListBox Methods

Methods

AddItem
Clear
Center
Hide
Refresh
RemoveItem
SetFocus
Show


ListBox Events

Events

OnClick
OnMouseEnter
OnMouseLeave


ListItem Object

Summary:

Represents a data item in a list control.


ListItem Properties

Properties

Text
Value


ListItemCollection Object

Summary:

A collection of ListItem objects in a control.


ListItemCollection Properties

Properties

Count
Item


ListItemCollection Methods

Methods

Add
Clear
Remove
RemoveAt


ListView Control

Description

Represents a Windows list view control, which displays a collection of items that can be displayed using one of four different views.

Overview

A ListView allows you to quickly display tabular data. It has four modes of operation:

  • Large Icon - Displays items with large icons and your main text

  • Small Icon - Displays items with small icons and your main text

  • List - Displays items with your main text

  • Details - Displays items with small icons, your main text, and any other subitems to be displayed in columns. Also known as Report view.

Structure

The general logical layout of the list view is as follows:

A list view is composed of columns and items. Items are composed of the main subject item and a collection of associated subitems (details) - one for each column defined. Item 0 (zero) can also be referred to as subitem 0. Items are analagous to Rows in a spreadsheet, and SubItems are analagous to Cells … although the analogy is not perfect – it can be usefull to think of a list view in those terms.

Keyboard Interface

If there is a selected row, the arrow keys will move the selection up or down. PgUp and PgDn down have their usual meanings. If MultiSelect is enabled, holding down the shift key and using the up and down arrow results in multiple rows of data being selected. Holding down the CTRL key while using the arrow keys results in moving the focus bar (dotted rectangle) during a selection and is used to select non-adjacent items. Hitting the space bar while in this mode selects the item. Holding down shift while using PgUp or PgDn down is a convienent way to select large amounts of data.

Mouse Interface

Left click on a row moves the focus and the selection to that row. Left click on a column header automatically sorts the column in reverse alphabetical order (that is to say – reverse to how it is currently sorted). Placing the mouse cursor between column headers and left-click-drag allows one to dynamically drag and resize the column. Double click between column headers automatically resizes the header to fit the largest item or subitem in that column.Use the mouse and scrollbars to access columns that may be out of view.

Creating a ListView

The list view is accessed as a regular COM object and inherits most of the properties, methods and behaviors supported by all other Kixforms objects. The following example creates an initially empty listview positioned in the top left corner of the form (0,0) with a width and height of approx. 200 pixels. These are arbitrary default values and should be customized after construction:

$ListView = $Form.Controls.ListView

Working with Columns

A newly created listview has no columns. Use the Columns property to return a reference to the Columns collection. The following example displays the count of the number of columns in the listview.

? "Count = " $ListView.Columns.Count

Use the Add method to create a new column and add it to the collection. The following example creates a new column labeled "Name" that is 50 pixels wide a left aligned.

$= $ListView.Columns.Add("Name",50,0)

The first optional parameter is the heading text that will appear inside the column header. The second parameter is the width (in pixels) of the column. The last optional parameter is the text alignment of the column and is specified as 0=Right 1=Left and 2=Centered. One can also construct a new column and set these attributes later. The following example hangs on to the handle returned from the Columns.Add method and uses it to specify each column property seperately.

$Column = $ListView.Columns.Add
$Column.Text = "Name"
$Column.Width = 100
$Column.Alignment = 2 ; Centered

Use the Insert method to create a new column and insert it at a specified index. Use the remove method to remove a column. The following example removes the last column in the collection.

$ListView.Columns.Remove($ListView.Columns.Count-1)

Working with Items

A listview control displays a list of items that are defined by the Item class. Use the Items property to return a reference to the Items collection. Use the Add method to create a new item and add it to the collection. The following example adds an item at the next available index. The first optional parameter is the text to display for the item. It returns a handle to the newly created item.

$Item = $ListView.Items.Add("John Doe")

Use the Insert method to create a new item and insert it at a specified index. The following example creates a new item and inserts it at the beginning of the list:

$Item = $ListView.Items.Insert(0,"John Doe")

Use Items(index), where index is the item index number, to return a single item from the collection. The following example sets the item text at index position 5 to a new value.

$ListView.Items(5).Text = "John Doe"

To remove an item from the collection, use the Remove method. To clear all items from the collection, use the Clear method. The following example removes all items from the listview.

$ListView.Items.Clear

Working with SubItems

Each Item can store subitem objects that are defined by the SubItem class. Subitems are displayed when there are columns defined in the listview, and when the View property of the ListView control is set to Details. Typically, subitems contain information that is related to their parent item. For example, if a ListView control displays items that represent orders, each item could display the order number. Subitems could be used to display information such as the product ordered, the quantity of items ordered, and the total price of the items ordered. Unlike Item objects, SubItem objects cannot be edited directly by the user (the user can edit Item objects if the LabelEdit property of the ListView control is set to true).

Use the SubItems collection to access individual subitem data within an item. SubItem(0) refers to the data displayed in the first column, SubItem(1) to the second column, and so on. Use the SubItems property to return a reference to the SubItems collection. The following example creates a ListView with three columns and adds 100 items and populates each with data.

$ListView = $Form.Controls.ListView
$ListView.Location = 0,0
$ListView.Size = $Form.ClientSize

$= $ListView.Columns.Add("Name")
$= $ListView.Columns.Add("Address")
$= $ListView.Columns.Add("Phone")

For $i = 1 to 100
 $Item = $ListView.Items.Add
 $Item.SubItems(0).Text = "John Doe"
 $Item.SubItems(1).Text = "74 Maple Drive"
 $Item.SubItems(2).Text = "905-555-1234"
Next

Note that SubItems(0) actually refers back to the main subject item itself, for example, the following two statements produce the exact same result. They both set the text value of $Item to "John Doe".

$Item.Text = "John Doe"
$Item.SubItems(0).Text = "John Doe"

Use SubItems(index), where index is the subitem index number, to return a single subitem from the collection. The following example gets the text value of second subitem of the first item in the listview.

$Value = $ListView.Items(0).SubItems(1).Text

Working with SelectedItems

The SelectedItems collection contains all the items in the control that are currently selected. Use the SelectedItems property to return a reference to the SelectedItems collection. If there are no selected items, the SelectedItems property returns an empty collection. The following example dumps the text of each selected item to the console.

If $ListView.SelectedItems.Count > 0
 For Each $Item In $ListView.SelectedItems
  ? "Text = " $Item.Text
 Next
EndIf

This example removes all the SelectedItems from the control.

For Each $Item In $ListView.SelectedItems
  $Item.Remove
Next

Working with the FocusedItem

Use the FocusedItem property to return a reference to the item in the control that currently has the focus. If no item in the control has the focus, FocusedItem returns an empty reference. The following example checks to see if the currently focused item is selected. If it is, a message is displayed to the console.

If $ListView.FocusedItem
  If $ListView.FocusedItem.Selected
   ?"The focused item is selected."
  EndIf
EndIf


ListView Constructor

Description

Creates a new ListView control.

Syntax

object.Controls.Add("ListView")

Example

$ListView = $Form.Controls.Add("ListView")

See Also

Applies To: ControlCollection


ListView Properties

Properties

Anchor
BackColor
BorderStyle
Bottom
Bounds
CheckBoxes
ClientHeight
ClientSize
ClientWidth
Columns
Cursor
Dock
Enabled
FocusedItem
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
FullRowSelect
GridLines
HeaderStyle
Height
HideSelection
Items
KeyCode
LabelEdit
LargeImageList
Left
Location
MouseButton
MouseX
MouseY
MultiSelect
Right
SelectedItems
Size
SmallImageList
Sorting
TabStop
Tag
Top
ToolTipText
View
Visible
Width


ListView Methods

Methods

Center
Clear
EnsureVisible
Hide
Refresh
SetFocus
Show


ListView Events

Events

OnClick
OnDoubleClick
OnMouseEnter
OnMouseLeave


MainMenu Object

Description

Represents the main menu of a form.

Remarks

The MainMenu control represents the container for the menu structure of a form. A menu is composed of MenuItem objects that represent the individual menu commands in the menu structure. Each MenuItem can be a command for your application or a parent menu for other submenu items. To bind the MainMenu to the Form that will display it, assign the MainMenu to the Menu property of the Form.

The MainMenu object has been enhanced in the current release. It now supports the new Office 2000 look and feel. To take advantage of this new look, set the form's Menu property to a newly created instance of MainMenu, then set the Style property to Office 2000, for example:

$Form.Menu = $System.MainMenu()
$Form.Menu.Style = 1

Menu icons are now supported. To use this new feature, set the MainMenu ImageList property to BuiltinImageList or use your own custom ImageList, then set the ImageIndex property of the MenuItem as required, for example:

$Form.Menu = $System.MainMenu()
$Form.Menu.Style = 1
$Form.Menu.ImageList = $System.BuiltinImageList()

$Form.FileMenu = $Form.Menu.MenuItems.Add("File")
$Form.OpenMenu = $Form.FileMenu.MenuItems.Add("Open")
$Form.OpenMenu.ImageIndex = 0

Example

The following function creates a MainMenu, assigns two MenuItem objects to the MainMenu and binds it to a form. This example assumes that you have passed a valid Form object to the function.

function CreateMyMainMenu($form)

   dim $mainMenu1, $menuItem1, $menuItem2

   ; Create an empty MainMenu.

   $mainMenu1 = $System.MainMenu()

   ; Add two MenuItem objects to the MainMenu.

   $menuItem1 = $mainMenu1.MenuItems.Add()
   $menuItem1.Text = "File"

   $menuItem2 = $mainMenu1.MenuItems.Add()
   $menuItem2.Text = "Edit"

   ; Bind the MainMenu to Form1.

   $form.Menu = $mainMenu1;

endfunction


MainMenu Properties

Properties

ImageList
MenuItems
Style


MaskedTextBox Object

Description

Uses a mask to distinguish between proper and improper user input.

Remarks

The MaskedTextBox class is an enhanced TextBox control that supports a declarative syntax for accepting or rejecting user input. Using the Mask property, you can specify the allowed input without writing any custom validation logic in your application.


MaskedTextBox Constructor

Description

Creates a new MaskedTextBox control.

Syntax

object.Controls.Add("MaskedTextBox")

Example

$MaskedTextBox = $Form.Controls.Add("MaskedTextBox")

See Also

Applies To: ControlCollection


MaskedTextBox Properties

Properties

Anchor
BackColor
Bottom
BorderStyle
Bounds
ClientHeight
ClientSize
ClientWidth
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Left
Location
Mask
PromptChar
Right
Size
Tag
Text
Top
Visible
Width


MaskedTextBox Methods

Methods

Center
Hide
Refresh
SetFocus
Show


MaskedTextBox Events

Events

OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnTextChanged


Math Object

Description

Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.


Math Constructor

Description

Creates a new Math object.

Syntax

Math()

Example

$Math = $System.Math()

See Also

Applies To: System


Math Properties

Properties

PI


Math Methods

Methods

Ceiling
Cos
Exp
Log
Log10
Pow
Sin
Sqrt


MenuItem Object

Description

Represents an individual item that is displayed within a MainMenu.

Remarks

In order for a MenuItem to be displayed, you must add it to a MainMenu. To create submenus, you can add MenuItem objects to the MenuItems property of the parent MenuItem.

The MenuItem class provides properties that enable you to configure the appearance and functionality of a menu item. To display a check mark next to a menu item, use the Checked property. You can use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. For example, if you have a set of menu items for setting the color of text in a TextBox control, you can use the Checked property to identify which color is currently selected. The Shortcut property can be used to define a keyboard combination that can be pressed to select the menu item.


MenuItem Properties

Properties

Checked
ImageIndex
Index
MenuItems
Shortcut
ShortcutText
Text
Visible


MenuItem Events

Events

OnClick


MenuItemCollection Class

Description

Represents the collection of menu items associated with the menu. This collection cannot be enumerated or indexed in the current release.


MenuItemCollection Methods

Methods

Add


MessageBox Object

Description

Displays a message box that can contain text, buttons, and symbols that inform and instruct the user.

Remarks

MessageBox is a modal dialog; therefore when shown, it blocks the rest of the script until the user has chosen an action. When a dialog is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog.


MessageBox Constructor

Description

Creates a new MessageBox object.

Syntax

MessageBox()

Example

$MessageBox = $System.MessageBox()

See Also

Applies To: System


MessageBox Properties

Properties

Style
Title


MessageBox Methods

Methods

Show


NotifyIcon Object

Description

Specifies a component that creates an icon in the status area.

Remarks

Icons in the status area are short cuts to processes that are running in the background of a computer, such as a virus protection program or a volume control. These processes do not come with their own user interfaces. The NotifyIcon class provides a way to program in this functionality. The Icon property defines the icon that appears in the status area. The Text property assigns ToolTip text. In order for the icon to show up in the status area, the Visible property must be set to true.


NotifyIcon Constructor

Description

Creates a new NotifyIcon object.

Syntax

NotifyIcon()

Example

$NotifyIcon = $System.NotifyIcon()

See Also

Applies To: System


NotifyIcon Properties

Properties

Icon
Text
Visible


NotifyIcon Events

Events

OnClick
OnDoubleClick


Object Object

Description

A user-definable object.

Remarks

The Object object supports dynamic (expando) properties, or properties that can be added and removed while the script is running. These properties can have any name, including numbers. A name of a property that is a simple identifier can be written after a period that follows the object name, such as:

$Object = $System.Object()

; Add two expando properties, 'Name' and 'Age'

$Object.Name = "Fred"
$Object.Age = 53

For a detailed discussion on object-oriented scripting, see Object Oriented Scripting.


Object Constructor

Description

Creates a new Object object.

Syntax

Object()

Example

$Object = $System.Object()

See Also

Applies To: System


OpenFileDialog Object

Description

Represents a common dialog box that displays the control that allows the user to open a file.

Remarks

This class allows you to check whether a file exists and to open it. The ShowReadOnly property determines whether a read-only check box appears in the dialog box. The ReadOnlyChecked property indicates whether the read-only check box is checked.

OpenFileDialog is a modal dialog; therefore when shown, it blocks the rest of the script until the user has chosen a file. When a dialog is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog.

Example

See OpenFileDialog example.


OpenFileDialog Constructor

Description

Creates a new OpenFileDialog object.

Syntax

$OpenFileDialog = $System.OpenFileDialog()

See Also

Applies To: System


OpenFileDialog Properties

Properties

CheckFileExists
DefaultExt
DereferenceLinks
FileName
Filter
FilterIndex
InitialDirectory
ReadOnlyChecked
RestoreDirectory
ShowReadOnly
Title


OpenFileDialog Methods

Methods

ShowDialog


Panel Object

Description

Represents a Windows Panel control.

Remarks

A Panel is a control that contains other controls. You can use a Panel to group collections of controls such as a group of RadioButton controls. As with other container controls such as the GroupBox control, if the Panel control's Enabled property is set to false, the controls contained within the Panel will also be disabled.

The Panel control is displayed by default without any borders. You can provide a standard or three-dimensional border using the BorderStyle property to distinguish the area of the panel from other areas on the form.


Panel Constructor

Description

Creates a new Panel control.

Syntax

object.Controls.Add("Panel")

Example

$Panel = $Form.Controls.Add("Panel")

See Also

Applies To: ControlCollection


Panel Properties

Properties

Anchor
BackColor
BackgroundImage
Bottom
BorderStyle
Bounds
ClientHeight
ClientSize
ClientWidth
Controls
Dock
DockPadding
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Left
Location
Right
Size
Tag
Top
Visible
Width


PictureBox Control

Description

Represents a Windows picture box control for displaying an image.

Remarks

This section of the help file is under development.


PictureBox Constructor

Description

Creates a new PictureBox control.

Syntax

object.Controls.Add("PictureBox")

Example

$PictureBox = $Form.Controls.Add("PictureBox")

See Also

Applies To: ControlCollection


PictureBox Properties

Properties

Anchor
BackColor
BackgroundImage
Bottom
BorderStyle
Bounds
ClientHeight
ClientSize
ClientWidth
Controls
Dock
DockPadding
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Image
Left
Location
Right
Size
SizeMode
Tag
Top
Visible
Width


PictureBox Methods

Methods

Center
Hide
Refresh
SetFocus
Show


PictureBox Events

Events

OnClick
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


Point Object

Description

Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.


Point Constructor

Description

Creates a new Point object.

Syntax

Point( x, y )

Parameters

x

The horizontal position of the point.

y

The vertical position of the point.

Example

$Form.Location = $System.Point(100,100)

See Also

Applies To: System


Point Properties

Properties

X
Y


ProgressBar Control

Description

A ProgressBar control visually indicates the progress of a lengthy operation.

Overview

The ProgressBar control displays a bar that fills in from left to right with the system highlight color as an operation progresses. The ProgressBar control is typically used when an application performs tasks such as copying files or printing documents. Users of an application might consider an application unresponsive if there is no visual cue. By using the ProgressBar in your application, you alert the user that the application is performing a lengthy task and that the application is still responding.

Using the ProgressBar

The Maximum and Minimum properties define the range of values to represent the progress of a task. The Minimum property is typically set to a value of zero, and the Maximum property is typically set to a value indicating the completion of a task. For example, to properly display the progress when copying a group of files, the Maximum property could be set to the total number of files to be copied. The Value property represents the progress that the application has made toward completing the operation. Because the bar displayed in the control is a collection of blocks, the value displayed by the ProgressBar only approximates the Value property's current value. Based on the size of the ProgressBar, the Value property determines when to display the next block.

There are a number of ways to modify the value displayed by the ProgressBar other than changing the Value property directly. You can use the Step property to specify a specific value to increment the Value property by, and then call the PerformStep method to increment the value. To vary the increment value, you can use the Increment method and specify a value with which to increment the Value property.


ProgressBar Constructor

Description

Creates a new ProgressBar control.

Syntax

object.Controls.Add("ProgressBar")

Example

$ProgressBar = $Form.Controls.Add("ProgressBar")

See Also

Applies To: ControlCollection


ProgressBar Properties

Properties

Anchor
BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
ForeColor
Height
Left
Location
Maximum
Minimum
MouseX
MouseY
Name
Orientation
Right
Size
Step
Style
TabStop
Tag
Text
Top
ToolTipText
Value
Visible
Width


ProgressBar Methods

Methods

Center
Hide
Increment
PerformStep
Refresh
Show


ProgressBar Events

Events

OnMouseEnter
OnMouseLeave


RadioButton Control

Description

Represents a Windows radio button.

Remarks

When the user selects one radio button within a group, the others clear automatically. All RadioButton controls in a given container, such as a Form, constitute a group. To create multiple groups on one form, place each group in its own container, such as a GroupBox control.

RadioButton and CheckBox controls have a similar function: they offer choices a user can select or clear. The difference is that multiple CheckBox controls can be selected at the same time, but radio buttons are mutually exclusive.

Use the Checked property to get or set the state of a RadioButton. The radio button's appearance can be altered to appear as a toggle-style button or as a standard radio button by setting the Appearance property.

Note: The radio button is sometimes referred to as an option button.


RadioButton Constructor

Description

Creates a new RadioButton control.

Syntax

object.Controls.Add("RadioButton")

Example

$RadioButton = $Form.Controls.Add("RadioButton")

See Also

Applies To: ControlCollection


RadioButton Properties

Properties

Anchor
Appearance
BackColor
Bottom
Bounds
CheckAlign
Checked
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
FlatStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Name
Right
Size
TabStop
Tag
Text
Top
ToolTipText
Visible
Width


RadioButton Methods

Methods

Center
Hide
Refresh
SetFocus
Show


RadioButton Events

Events

OnClick
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


Rectangle Object

Description

Stores a set of four integers that represent the location and size of a rectangle.

Remarks

A rectangle is defined by its width, height, and upper-left corner.


Rectangle Constructor

Description

Creates a new Rectangle object.

Syntax

Rectangle( x, y, width, height )

Parameters

x

An optional numeric expression specifying the x-coordinate of the upper-left corner of the rectangle. The default is zero.

y

An optional numeric expression specifying the y-coordinate of the upper-left corner of the rectangle. The default is zero.

width

An optional numeric expression specifying the width of the rectangle. The default is zero.

height

An optional numeric expression specifying the height of the rectangle. The default is zero.

Example

$Form.Bounds = $System.Rectangle(100,100,640,480)

See Also

Applies To: System


Rectangle Properties

Properties

Bottom
Height
Left
Location
Right
Size
Top
Width


RichTextBox Control

Description

Represents a Windows rich text box control.

Remarks

The RichTextBox control allows the user to enter and edit text while also providing more advanced formatting features than the standard TextBox control. Text can be assigned directly to the control, or can be loaded from a Rich Text Format (RTF) or plain text file. The text within the control can be assigned character and paragraph formatting.

The RichTextBox control provides methods that provide functionality for opening and saving files. The LoadFile method enables you to load an existing RTF or ASCII text file into the control. You can also load data from an already opened data stream. The SaveFile enables you to save a file to RTF or ASCII text. Similar to the LoadFile method, you can also use the SaveFile method to save to an open data stream. The RichTextBox control also provides features for finding strings of text. The Find method is overloaded to find both strings of text as well as specific characters within the text of the control.


RichTextBox Method (Controls Collection)

Description

Creates a new RichTextBox control.

Syntax

object.Controls.Add("RichTextBox")

Example

$RichTextBox = $Form.Controls.Add("RichTextBox")

See Also

Applies To: ControlCollection


RichTextBox Properties

Properties

AcceptsReturn
AcceptsTab
Anchor
BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
HideSelection
Html
Left
Location
MaxLength
Modified
MouseButton
MouseX
MouseY
Multiline
ReadOnly
Right
ScrollBars
SelectedText
SelectionLength
SelectionStart
Size
TabStop
Tag
Text
ToolTipText
Top
Visible
Width
WordWrap


RichTextBox Methods

Methods

Center
Copy
Cut
Hide
LoadFile
Paste
Refresh
SaveFile
ScrollToCaret
SetFocus
Show
Undo


RichTextBox Events

Events

OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnTextChanged


SaveFileDialog Object

Description

Represents a common dialog box that allows the user to specify options for saving a file.

Remarks

SaveFileDialog is a modal dialog; therefore when shown, it blocks the rest of the script until the user has chosen a file. When a dialog is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog.


SaveFileDialog Constructor

Description

Creates a new SaveFileDialog object.

Syntax

SaveFileDialog()

Example

$SaveFileDialog = $System.SaveFileDialog()

See Also

Applies To: System


SaveFileDialog Properties

Properties

CheckFileExists
DefaultExt
FileName
Filter
FilterIndex
InitialDirectory
OverwritePrompt
RestoreDirectory
Title


SaveFileDialog Object

Methods

ShowDialog


Screen Object

Description

Represents the display device on a single system.

Remarks

Use the Screen property to return a reference to the Screen object.


Screen Properties

Properties

Bounds
WorkingArea


ScrollBar Control

Description

Under Construction.


ScrollBar Constructor

Description

Creates a new ScrollBar control.

Syntax

object.Controls.Add("ScrollBar")

Example

$ScrollBar = $Form.Controls.Add("ScrollBar")

See Also

Applies To: ControlCollection


ScrollBar Events

Events

OnMouseEnter
OnMouseLeave


SelectedItems Collection

Description

A collection of all the selected items in the control. Each item is represented by an Item object.

Remarks

Use the SelectedItems property to return a reference to the SelectedItems collection. The following example dumps the text of each selected item to the console.

For Each $Item In $ListView.SelectedItems
 ? "Text = " $Item.Text
Next


SelectedItems Properties

Properties

Count


SelectedItems Methods

Methods

Clear


Size Object

Description

Stores an ordered pair of integers, typically the width and height of a rectangle.


Size Constructor

Description

Creates a new Size object.

Syntax

Size( width, height )

Parameters

width - An optional numeric expression specifying the width of the new size. The default is zero.

height - An optional numeric expression specifying the height of the new size. The default is zero.

Example

$Form.Size = $System.Size(640,480)

See Also

Applies To: System


Size Properties

Properties

Height
Width


SplitContainer Object

Summary:

Represents a control consisting of a movable bar that divides a container's display area into two resizable panels. You can easily add controls to these panels, and you can add other SplitContainer controls to existing SplitContainer panels in order to have many resizable display areas.


SplitContainer Constructor

Description

Creates a new SplitContainer control.

Syntax

object.Controls.Add("SplitContainer")

Example

$SplitContainer = $Form.Controls.Add("SplitContainer")

See Also

Applies To: ControlCollection


SplitContainer Properties

Properties

Anchor
BackColor
Bottom
BorderStyle
Bounds
ClientHeight
ClientSize
ClientWidth
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
Left
Location
Orientation
Panel1
Panel1Collapsed
Panel2
Panel2Collapsed
Right
Size
SplitterDistance
Tag
Top
Visible
Width


SplitContainer Methods

Methods

Center
Hide
Refresh
SetFocus
Show


Splitter Control

Description

Represents a splitter control that allows the user to resize docked controls.

Remarks

The Splitter control enables you to resize controls that are docked to the edges of the Splitter control at run time. When the user passes the mouse pointer over the Splitter control, the cursor changes to indicate that the controls docked to the Splitter control can be resized. The Splitter control enables the user to resize the docked control that is immediately before it in the docking order. Therefore, to enable the user to resize a docked control, dock the control you want the user to be able to resize to an edge of a container, and then dock a splitter to the same side of that container.

For example, to create a window similar to Windows Explorer, add a TreeView control to a form and set its Dock property to Left. Add a Splitter control to the form and set its Dock property to Left as well. To complete the form layout, add a ListView control and set its Dock property to Fill to have the ListView occupy the remaining space on the form. At run time, the user can then resize the width of the TreeView control (as well as the ListView control) by moving the Splitter control. See the full example here.


Splitter Constructor

Description

Creates a new Splitter control.

Syntax

object.Controls.Add("Splitter")

Example

$Splitter = $Form.Controls.Add("Splitter")

See Also

Applies To: ControlCollection


Splitter Properties

Properties

BackColor
Dock


StatusBar Object

Summary:

Represents a Windows status bar control.

Example

The following example creates a Form with a StatusBar. When the form is clicked, the number of clicks is displayed in the StatusBar.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()
$Form.OnClick = "FormClick()"

$StatusBar = $Form.StatusBar()
$StatusBar.Text = "Ready"

$i = 0

$Form.Center
$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function FormClick()

 $i = $i + 1

 $StatusBar.Text = "Click Count = " + $i

EndFunction


StatusBar Constructor

Description

Creates a new Label control.

Syntax

object.Controls.Add("Label")

Remarks:

The StatusBar should be created (and docked) as the first control on any form. This ensures that it is properly positioned relative to all other controls.

Example

$Label = $Form.Controls.Add("Label")

See Also

Applies To: ControlCollection


StatusBar Properties

Properties

Dock
Font
SizingGrip
Text


SubItem Object

Description

Represents a single subitem in an Item. The SubItem object is a member of the SubItems collection. The SubItems collection contains all the SubItem objects contained in a single item.

Remarks

A ListView control displays a list of items that are defined by the Item class. Each Item can store subitem objects that are defined by the SubItem class. Subitems are displayed when the View property of the ListView control is set to Details. Typically, subitems contain information that is related to their parent item. For example, if a ListView control displays items that represent orders, each item could display the order number. Subitems could be added to each item to display information such as the product ordered, the quantity of items ordered, and the total price of the items ordered. Unlike Item objects, SubItem objects cannot be edited directly by the user (the user can edit Item objects if the LabelEdit property of the ListView control is set to true).


SubItem Properties

Properties

Text


SubItems Collection Object


SubItems Properties

Properties

Under construction.


System Object

Description


System Constructor

Description

Creates a new system System object.

Syntax

CreateObject("Kixtart.System")

Example

$System = CreateObject("Kixtart.System")


System Properties

Properties

ActiveForm
Build
BuiltinIcons
BuiltinImageList
EventArgs
Environment
Screen
Sender
Version


System Methods

Methods

Bitmap
Collection
ColorDialog
DoEvents
FolderBrowserDialog
Font
FontDialog
Form
Icon
ImageList
Math
MessageBox
NotifyIcon
Object
OpenFileDialog
Point
Rectangle
SaveFileDialog
Shell
Size
Timer


TabControl Control

Description

Manages a related set of TabPage objects.

Remarks

A TabControl contains tab pages, which are represented by TabPage objects that you add through the TabPages collection. Use the TabPages property to return a reference to the TabPages collection.

The TabControl object supports dynamic (expando) properties. However please note that you cannot use existing property, method or event names as expando names. Try to devise a unique naming scheme for expandos to avoid name conflicts today and in the future.

Important: There is a known issue with having an empty (control-less) TabPage in a multi-page TabControl. Under certain circumstances, when attempting to navigate the tabs using the keyboard, your process can hang. This is easily avoided by not exposing an empty TabPage in your interface, or if absolutely necessary, by creating a special hidden control in the TabPage.


TabControl Constructor

Description

Creates a new TabControl control.

Syntax

object.Controls.Add("TabControl")

Example

$TabControl = $Form.Controls.Add("TabControl")

See Also

Applies To: ControlCollection


TabControl Properties

Properties

Alignment
Appearance
Anchor
BackColor
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
ImageList
Left
Location
Multiline
Name
Right
SelectedIndex
SelectedTab
Size
SizeMode
TabPages
TabStop
Tag
Top
Visible
Width


TabControl Methods

Methods

Center
Hide
Refresh
SetFocus
Show


TabControl Events

Events

OnMouseEnter
OnMouseLeave
OnSelectedIndexChanged


TabPage Control

Description

Represents a single tab page in a TabControl.

The TabPage object supports dynamic (expando) properties. However please note that you cannot use existing property, method or event names as expando names. Try to devise a unique naming scheme for expandos to avoid name conflicts today and in the future.

Important: There is a known issue with having an empty (control-less) TabPage in a multi-page TabControl. Under certain circumstances, when attempting to navigate the tabs using the keyboard, your process can hang. This is easily avoided by not exposing an empty TabPage in your interface, or if absolutely necessary, by creating a special hidden control in the TabPage.


TabPage Properties

Properties

BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Controls
Cursor
DockPadding
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
ImageIndex
Left
Location
MouseButton
MouseX
MouseY
Name
Right
Size
Tag
Text
Top
Width


TabPage Events

Kixforms Class Library

TapPage Events

Events

OnMouseEnter
OnMouseLeave


TabPages Collection

Description

A collection of all the tab pages in the specified control. Each tab page is represented by a TabPage object.

Remarks

Use the TabPages property to return a reference to the TabPages collection.

Example

The following example creates a Form with a TabControl containing three TabPage controls. This example uses the Remove method to remove each tab from the collection.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Form.ClientSize = 300, 300

$Form.TabControl1 = $Form.TabControl()
$Form.TabControl1.Location = 25, 25
$Form.TabControl1.Size = 250, 200

; Populates TabControl1 with three tab pages ...

$Form.TabPage1 = $Form.TabControl1.TabPages.Add("TabPage1")
$Form.TabPage2 = $Form.TabControl1.TabPages.Add("TabPage2")
$Form.TabPage3 = $Form.TabControl1.TabPages.Add("TabPage3")

$Form.Button1 = $Form.Button()
$Form.Button1.Center
$Form.Button1.Top = $Form.TabControl1.Bottom + 20
$Form.Button1.OnClick = "Click()"
$Form.Button1.Text = "Remove Tab"

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function Click()

 ; Get the TabControl TabPages collection
 ; and remove the first TabPage by index.

 If $Form.TabControl1.TabPages.Count

  $Form.TabControl1.TabPages.Remove(0)

  $= $System.MessageBox.Show("The are now " + $Form.TabControl1.TabPages.Count + " tab pages.")

 EndIf

EndFunction


TabPages Properties

Properties

Count


TabPages Methods

Methods

Add
Remove


TextBox Control

Description

Represents a Windows text box control.

Remarks

The TextBox control allows the user to enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing and password character masking.

Typically, a TextBox control is used to display, or accept as input, a single line of text. You can use the Multiline and ScrollBars properties to enable multiple lines of text to be displayed or entered. Set the AcceptsTab and AcceptsReturn properties to true to allow greater text manipulation in a multiline TextBox control. You can limit the amount of text entered into a TextBox control by setting the MaxLength property to a specific number of characters. TextBox controls can also be used to accept passwords and other sensitive information. You can use the PasswordChar property to mask characters entered in a single-line version of the control.

To restrict text from being entered in a TextBox control, you can create an event handler for the KeyDown event in order to validate each character entered in the control. You can also restrict all entry of data in a TextBox control by setting the ReadOnly property to true.


TextBox Constructor

Description

Creates a new TextBox control.

Syntax

object.Controls.Add("TextBox")

Example

$TextBox = $Form.Controls.Add("TextBox")

See Also

Applies To: ControlCollection


TextBox Properties

Properties

AcceptsReturn
AcceptsTab
Anchor
AutoTab
BackColor
BorderStyle
Bottom
Bounds
CharacterCasing
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
HideSelection
KeyCode
Left
Location
MaxLength
Modified
MouseButton
MouseX
MouseY
Multiline
PasswordChar
ReadOnly
Right
ScrollBars
SelectedText
SelectionLength
SelectionStart
Size
TabStop
Tag
Text
TextAlign
ToolTipText
Top
Visible
Width
WordWrap


TextBox Methods

Methods

Center
Copy
Cut
Hide
Paste
Refresh
ScrollToCaret
SetFocus
Show
Undo


TextBox Events

Events

OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnTextChanged


Timer Object

Description

Implements a timer that raises an event at user-defined intervals.

Remarks

A Timer is used to raise an event at user-defined intervals. When using this timer, use the OnTick event to perform a polling operation or to display a splash screen for a specified amount of time. Whenever the Enabled property is set to true and the Interval property is greater than zero, the Tick event is raised at intervals based on the Interval property setting. This class also provides methods to set the interval, and to Start and Stop the timer.


Timer Constructor

Description

Creates a new Timer object.

Syntax

Timer()

Example

$Timer1 = $System.Timer()

See Also

Applies To: System


Timer Properties

Properties

Enabled
Interval


Timer Methods

Methods

Start
Stop


Timer Events

Events

OnTick


ToolButton Control

Description

Represents a Windows toolbutton control.


ToolButton Constructor

Description

Creates a new ToolButton control.

Syntax

object.Controls.Add("ToolButton")

Example

$ToolButton = $Form.Controls.Add("ToolButton")

See Also

Applies To: ControlCollection


ToolButton Properties

Properties

Alignment
Anchor
BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Default
Dock
Enabled
FlatStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
Height
HotBackColor
HotForeColor
Icon
Image
KeyCode
Left
Location
MouseButton
MouseX
MouseY
Pushed
Right
Size
Style
TabStop
Tag
Text
Top
ToolTipText
Visible
Width


ToolButton Methods

Methods

Center
Hide
Refresh
SetFocus
Show


ToolButton Events

Events

OnClick
OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp


TrackBar Control

Description

Represents a standard Windows trackbar control.

Remarks

A TrackBar is a scrollable control similar to the ScrollBar control. You can configure ranges through which the value of the Value property of a trackbar scrolls by setting the Minimum property to specify the lower end of the the range and the Maximum property to specify the upper end of the range.

You can use this control to input numeric data obtained through the Value property. You can display this numeric data in a control or use it in code.

Example

The following example creates a TrackBar. The code then initializes the range properties Maximum, Minimum, and Value. The OnScroll event is used to report the current position of the slider into a TextBox control.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$TextBox = $Form.Controls.Add("TextBox")
$TextBox.Center
$TextBox.ReadOnly = True

$TrackBar = $Form.Controls.Add("TrackBar")
$TrackBar.Center
$TrackBar.Top = $TextBox.Bottom + 10
$TrackBar.Maximum = 200
$TrackBar.Minimum = 100
$TrackBar.Value = 150
$TrackBar.OnScroll = "OnTrackBarScroll"
$TrackBar.Anchor = 15

Function OnTrackBarScroll()
 $TextBox.Text = $TrackBar.Value
EndFunction

$TextBox.Text = $TrackBar.Value

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1


TrackBar Constructor

Description

Creates a new TrackBar control.

Syntax

object.Controls.Add("TrackBar")

Example

$TrackBar = $Form.Controls.Add("TrackBar")

See Also

Applies To: ControlCollection


TrackBar Properties

Properties

Anchor
BackColor
BorderStyle
Bottom
Bounds
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
ForeColor
Height
Left
Location
Maximum
Minimum
MouseX
MouseY
Name
Orientation
Right
Size
Step
TabStop
Tag
Text
TickStyle
Top
ToolTipText
Value
Visible
Width


TrackBar Methods

Methods

Center
Hide
Refresh
SetFocus
Show


TrackBar Events

Events

OnGotFocus
OnKeyDown
OnLostFocus
OnMouseDown
OnMouseEnter
OnMouseLeave
OnMouseMove
OnMouseUp
OnScroll


TreeNode Object

Description

Remarks


ITreeNode Properties

Kixforms Class Library

TreeNode Properties

Properties

Checked
ImageIndex
Index
SelectedImageIndex
Parent
Tag
Text


TreeNode Methods

Methods

Remove


TreeNodeCollection Object

Description


TreeNodeCollection Properties

Properties

Count


TreeNodeCollection Methods

Methods

Add
Clear
Insert
Remove


TreeView Control

Description

Displays a hierarchical collection of labeled items, each represented by a TreeNode.

Remarks


TreeView Constructor

Description

Creates a new TreeView control.

Syntax

object.Controls.Add("TreeView")

Example

$TreeView = $Form.Controls.Add("TreeView")

See Also

Applies To: ControlCollection


TreeView Properties

Properties

Anchor
BackColor
BorderStyle
Bottom
Bounds
CheckBoxes
ClientHeight
ClientSize
ClientWidth
Cursor
Dock
Enabled
Font
FontBold
FontItalic
FontName
FontSize
FontStrikeout
FontUnderline
ForeColor
FullRowSelect
GridLines
Height
HideSelection
HotTracking
ImageIndex
ImageList
KeyCode
LabelEdit
Left
Location
MouseButton
MouseX
MouseY
Nodes
Right
SelectedNode
SelectedImageIndex
ShowLines
ShowPlusMinus
ShowRootLines
Size
Sorted
TabStop
Tag
Top
ToolTipText
Visible
Width


TreeView Methods

Methods

Center
Hide
Refresh
SetFocus
Show


TreeView Events

Events

OnAfterSelect
OnBeforeExpand
OnClick
OnDoubleClick
OnMouseEnter
OnMouseLeave


AcceptsReturn Property

Description

Gets or sets a value indicating whether pressing ENTER in a multiline TextBox control creates a new line of text in the control or activates the default button for the form.

Syntax

object.AcceptsReturn [ = Boolean ]

Property Value

True if the ENTER key creates a new line of text in a multiline textbox control; False if the ENTER key activates the default button for the form. The default is True.

See Also

Applies To: TextBox


AcceptsTab Property

Description

Gets or sets whether pressing the TAB key in a multiline control types a TAB character in the control instead of moving the focus to the next control in the tab order.

Syntax

object.AcceptsTab [ = Boolean ]

Property Value

True if users can enter tabs in a multiline control using the TAB key; false if pressing the TAB key moves the focus. The default is false.

See Also

Applies To: TextBox


ActiveControl Property

Description

Gets the active control on the container control.

Syntax

object.ActiveControl

Property Value

An object representing the control that is currently active on the container control.

See Also

Applies To: Form


ActiveForm Property

Description

Gets the currently active form for this application.

Syntax

object.ActiveForm

Property Value

A Form that represents the currently active form, or a empty reference if there is no active form.

Remarks

You can use this method to obtain a reference to the currently active form to perform actions on the form or its controls.

See Also

Applies To: System


Alignment Property (TabControl Control)

Description

Gets or sets the area of the control (for example, along the top) where the tabs are aligned.

Syntax

objectAlignment [ = Value ]

Property Value

One of the following values. The default is Top.

Value | Name | Description
0 | Top | The tabs are located across the top of the control.
1 | Bottom | The tabs are located across the bottom of the control.

See Also

Applies To: TabControl


Alignment Property (ToolButton Control)

Description

Gets or sets the alignment of the icon in a toolbutton control.

Syntax

object.Alignment [ = Value ]

Property Value

One of the following values. The default is Left.

Value | Name | Description
0 | Left | The object or text is aligned on the left of the control element.
1 | Right | The object or text is aligned on the right of the control element.
2 | Center | The object or text is aligned in the center of the control element.

See Also

Applies To: ToolButton


Anchor Property

Description

Gets or sets which edges of the control are anchored to the edges of its container.

Syntax

object.Anchor [ = Value ]

Property Value

A bitwise combination of the following values. The default is Top and Left.

Value | Name | Description
0 | None | The control is not anchored to any edges of its container.
1 | Top | The control is anchored to the top edge of its container.
2 | Bottom | The control is anchored to the bottom edge of its container.
4 | Left | The control is anchored to the left edge of its container.
8 | Right | The control is anchored to the right edge of its container.

Remarks

A control can be anchored to one or more edges of its parent container. Anchoring a control to its parent ensures that the anchored edges remain in the same position relative to the edges of the parent container when the parent container is resized. For example, if you have a Form with a Button whose Anchor property value is set to Top and Bottom, the Button is stretched to maintain the anchored distance to the top and bottom edges of the Form as the Height of the Form is increased.


Appearance Property (CheckBox Control)

Description

Gets or sets the value that determines the appearance of a check box control.

Syntax

Appearance [ = Long ]

Property Value

One of the Appearance values. The default is Normal.

Remarks

If the Appearance value is set to Normal, the check box has a typical appearance. If the value is set to Button, the check box appears like a toggle button, which can be toggled to an up or down state.

See Also

Applies To: CheckBox


Appearance Property (RadioButton Control)

Description

Gets or set the value that determines the appearance of the radio button control.

Syntax

Appearance [ = Long ]

Property Value

One of the Appearance values. The default is Normal.

Remarks

If the Appearance value is set to Normal, then the RadioButton control is drawn with a circular check box. If the value is set to Button, then the RadioButton control is drawn as a button that can be toggled to an up or down state. Either type can display text or an image, but not both.

See Also

Applies To: RadioButton


Appearance Property (TabControl Control)

Description

Gets or sets the visual appearance of the control's tabs.

Syntax

object.Appearance [ = Value ]

Property Value

One of the following values. The default is Normal.

Value | Name | Description
0 | Normal | The tabs have the standard appearance of tabs.
1 | Buttons | The tabs have the appearance of three-dimensional buttons.
2 | FlatButtons | The tabs have the appearance of flat buttons.

See Also

Applies To: TabControl


Application Property

Description

Gets the Application object for this application.

Syntax

Application

Property Value

The Application object for this application.

See Also

Applies To: System


AutoTab Property

Description

Gets or sets whether an automatic TAB occurs when the users enters the maximum allowable number of characters into the control.

Syntax

AutoTab [ = Boolean ]

Property Value

True if an automatic TAB occurs; otherwise, false. The default is false.


BackColor Property

Summary:

Gets or sets the background color of the object.

Syntax:

object.BackColor [ = long ]

object.BackColor = long, long, long

object.BackColor = string

Property Values:

One of the Color values.


BackgroundImage Property

Description

Gets or sets the background image displayed in the control.

Syntax

object.BackgroundImage [ = bitmap ]

object.BackgroundImage = "filename"

Property Value

bitmap

A Bitmap that represents the image to display in the background of the control.

filename

A string expression that evaluates to the the fully qualified path of a graphics file.

See Also

Applies To: Form | Label | Panel | PictureBox


Bold Property

Description

Gets or sets a value that indicates whether this Font object is bold.

Syntax

Bold [ = Boolean ]

Property Value

This property returns true if this Font object is bold; otherwise, false.

Example

$Font.Bold = 1

See Also

Applies To: Font


BorderStyle Property

Description

Gets or sets the border style of the control.

Syntax

object.BorderStyle [ = Value ]

object.BorderStyle = "Name"

Property Value

One of the following values:

Value | Name | Description
0 | None | No border
1 | FixedSingle | A single-line border.
2 | Fixed3D | A three-dimensional border. The exact behavior of this setting depends on the object.

Example

$Label.BorderStyle = 2
$Label.BorderStyle = "FixedSingle"


Bottom Property

Description

Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

Syntax

Bottom [ = Long ]


Bounds Property

Description

Gets or sets the size and location of the object.

Syntax

Bounds [ = Rectangle ]

Bounds = Left, Top, Width, Height

Property Value

Rectangle - A Rectangle specifying the location and size of the object.

Left, Top, Width, Height - An array of four numbers specifying the location (Left and Top) and size (Width and Height) of the object.

Remarks

Screen: This property is read-only.


Build Property

Description

Returns the current Kixforms build number.

Syntax

object.Build

Property Value

A long integer value specifying the Kixforms build number, for example 41.

Remarks

The build number is incremented by one for every release of KiXforms. The version property returns a string which contains both the release number e.g. 2.3.0 and the build number e.g. 40. Betas have the same release number, but incremental build numbers. The release number is only incremented when the current beta phase is completed. For example:

Release | Version | Build
KiXforms 2.2.0 | 2.2.0 | 37
KiXforms 2.3.0 Beta 1 | 2.3.0 | 38
KiXforms 2.3.0 Private Beta 2 | 2.3.0 | 39
KiXforms 2.3.0 Beta 2 | 2.3.0 | 40
KiXforms 2.3.0 Beta 3 | 2.3.0 | 41

One can quickly determine the current version and build number by examining the version properties of the KIXFORMS.DLL itself. To check the version of a running form, click the top-left form control box and select "About...".


BuiltinIcons Property

Description

Returns the collection of all the builtin Kixforms icons.

Syntax

BuiltinIcons

Property Value

The collection of builtin Icon objects.

Remarks

Use BuiltinIcons( index ), where index is the index number of the builtin icon, to return a specific Icon from the collection. All icons are 16x16 16 color.

Note: This collection cannot be enumerated in the current release.

Example

$Form.Icon = $System.BuiltinIcons(33)

See Also

Applies To: System


BuiltinImageList Property

Description

Returns the list of builtin Kixforms icons as an imagelist.

Syntax

BuiltinImageList

Property Value

An ImageList containing all the builtin icons.

Remarks

All images are 16x16 and 16 color.

See Also

Applies To: System


Button Property

Description

Gets which mouse button was pressed.

Syntax

object.Button

Property Value

A bitwise combination of the following values:

Value | Description
0 | No mouse button was pressed.
1048576 | The left mouse button was pressed.
2097152 | The right mouse button was pressed.
4194304 | The middle mouse button was pressed.

See Also

Applies To: EventArgs


Cancel Property

Description

Gets or sets whether the control is automatically clicked when the user presses the ESC key, even if the control does not have the keyboard focus.

Syntax

Cancel [ = Boolean ]

Property Value

True if the control is automatically clicked when the user presses the ESC key; otherwise, false. The default is false.

See Also

Applies To: Button


Cancel Property (EventArgs Object)

Description

Gets or sets a value indicating whether the event should be canceled.

Syntax

object.Cancel [ = Boolean ]

Property Value

True if the event should be canceled; otherwise, false.

See Also

Applies To: EventArgs


Ceiling Method

Description

Returns the smallest whole number greater than or equal to the specified number.

Syntax

Ceiling( n )

Parameters

n:

A numeric expression.

Return Value

A double representing the ceiling of n.

See Also

Applies To: Math


CharacterCasing Property (TextBox Control)

Description

Gets or sets whether the TextBox control modifies the case of characters as they are typed.

Syntax

object.CharacterCasing [ = Value ]

Property Value

One of the following values that specifies whether the TextBox control modifies the case of characters. The default is Normal.

Value | Name | Description
0 | Normal | The case of characters is left unchanged.
1 | Upper | Converts all characters to uppercase.
2 | Lower | Converts all characters to lowercase.

See Also

Applies To: TextBox


CheckAlign Property (CheckBox Control)

Description

Gets or sets the horizontal and vertical alignment of a check box on a check box control.

Syntax

object.CheckAlign [ = Value ]

Property Value

One of the following values:

Value | Name | Description
16 | MiddleLeft | Text is vertically aligned in the middle, and horizontally aligned on the left.
64 | MiddleRight | Text is vertically aligned in the middle, and horizontally aligned on the right.

See Also

Applies To: CheckBox


CheckAlign Property (RadioButton Control)

Description

Gets or sets the location of the check box portion of the radio button control.

Syntax

object.CheckAlign [ = Value ]

Property Value

One of the following values:

Value | Name | Description
16 | MiddleLeft | Text is vertically aligned in the middle, and horizontally aligned on the left.
64 | MiddleRight | Text is vertically aligned in the middle, and horizontally aligned on the right.

See Also

Applies To: RadioButton


CheckBoxes Property

Description

Gets or sets a value indicating whether a check box appears next to each item in the control.

Syntax

CheckBoxes [ = Boolean ]

Property Value

True if a check box appears next to each item in the control; otherwise, false. The default is false.

Remarks

TreeView: If you want to use this style, you must set the CheckBoxes property after you create the treeview control, and before you populate the tree. Once a tree-view control is populated with this style, the style cannot be removed. Instead, you must destroy the control and create a new one in its place.

See Also

Applies To: ListView | TreeView


Checked Property

Description

Gets or sets whether the object is in the checked state.

Syntax

object.Checked [ = Boolean ]

Property Value

True if the object is in the checked state; otherwise, false. The default value is false.

See Also

Applies To: CheckBox | MenuItem | RadioButton | TreeNode


CheckFileExists Property

Description

Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.

Syntax

CheckFileExists [ = Boolean ]

Property Value

True if the dialog box displays a warning when the user specifies a file name that does not exist; otherwise, false.

See Also

Applies To: OpenFileDialog | SaveFileDialog


CheckState Property

Description

Gets or sets the state of the check box.

Syntax

CheckState [ = Long ]

Property Value

One of the following values. The default value is Unchecked.

Value | Name | Description
0 | Unchecked | The checkbox is unchecked.
1 | Checked | The checkbox is checked
2 | Indeterminate | The checkbox is indeterminate. An indeterminate checkbox generally has a shaded appearance.

See Also

Applies To: CheckBox


ClientHeight Property

Description

Gets or sets the height of the client area of the control.

Syntax

ClientHeight [ = Long ]

Property Value

The client height of the control, in pixels.

Remarks

The client area of a control is the bounds of the control, minus the nonclient elements such as scroll bars, borders, title bars, and menus.


Control.ClientSize Property

Description

Gets or sets the width and height of the client area of the control.

Syntax

object.ClientSize [ = size ]

object.ClientSize = long, long

Property Value

size - a Size object that represents the height and width of the client area of the control in pixels.

long, long - an array of two numbers specifying the width and height of the client area of the control (in pixels).

Example

$Form.ClientSize = $System.Size(640, 480)

$Form.ClientSize = 640, 480

Remarks

The client area of a control is the bounds of the control, minus the nonclient elements such as scroll bars, borders, title bars, and menus.


ClientWidth Property

Description

Gets or sets the width of the client area of the control.

Syntax

ClientWidth [ = Long ]

Property Value

A numeric expression specifying the client width of the control, in pixels.

Remarks

The client area of a control is the bounds of the control, minus the nonclient elements such as scroll bars, borders, title bars, and menus.


Color Property

Description

Gets or sets the color.

Syntax

Color [ = Long ]

Color = Long, Long, Long

Color = String

Property Value

Long

A number in the range &0 to &FFFFFF representing a valid RGB color. The blue color component is encoded in the high-order byte; the green color component is encoded in the middle byte and the Red color component is encoded in the low-order byte, examples:

$Object.Color = &0000FF ; Red
$Object.Color = &00FF00 ; Green
$Object.Color = &FF0000 ; Blue
$Object.Color = &00FFFF ; Yellow

Long, Long, Long

An array of three numbers each in the range 0 to 255 representing the valid red, green and blue color components of a RGB color, examples:

$Object.Color = 255, 0, 0    ; Red
$Object.Color = 0, 255, 0    ; Green
$Object.Color = 0, 0, 255    ; Blue
$Object.Color = 255, 255, 0  ; Yellow

String

A string expression that evaluates to a well-known system color. The following colors are supported:

Color | String Value | Hex Value | Red Value | Green Value | Blue Value
 | AliceBlue | FFF8F0 | 240 | 248 | 255
 | AntiqueWhite | D7EBFA | 250 | 235 | 215
 | Aqua | FFFF00 | 0 | 255 | 255
 | Aquamarine | D4FF7F | 127 | 255 | 212
 | Azure | FFFFF0 | 240 | 255 | 255
 | Beige | DCF5F5 | 245 | 245 | 220
 | Bisque | C4E4FF | 255 | 228 | 196
 | Black | 000000 | 0 | 0 | 0
 | BlanchedAlmond | CDEBFF | 255 | 235 | 205
 | Blue | FF0000 | 0 | 0 | 255
 | BlueViolet | E22B8A | 138 | 43 | 226
 | Brown | 2A2AA5 | 165 | 42 | 42
 | BurlyWood | 87B8DE | 222 | 184 | 135
 | CadetBlue | A09E5F | 95 | 158 | 160
 | Chartreuse | 00FF7F | 127 | 255 | 0
 | Chocolate | 1E69D2 | 210 | 105 | 30
 | Coral | 507FFF | 255 | 127 | 80
 | CornflowerBlue | ED9564 | 100 | 149 | 237
 | Cornsilk | DCF8FF | 255 | 248 | 220
 | Crimson | 3C14DC | 220 | 20 | 60
 | Cyan | FFFF00 | 0 | 255 | 255
 | DarkBlue | 8B0000 | 0 | 0 | 139
 | DarkCyan | 8B8B00 | 0 | 139 | 139
 | DarkGoldenrod | BB86B8 | 184 | 134 | 11
 | DarkGray | A9A9A9 | 169 | 169 | 169
 | DarkGreen | 006400 | 0 | 100 | 0
 | DarkKhaki | 6BB7BD | 189 | 183 | 107
 | DarkMagenta | 8B008B | 139 | 0 | 139
 | DarkOliveGreen | 2F6B55 | 85 | 107 | 47
 | DarkOrange | 008CFF | 255 | 140 | 0
 | DarkOrchid | CC3299 | 153 | 50 | 204
 | DarkRed | 00008B | 139 | 0 | 0
 | DarkSalmon | 7A96E9 | 233 | 150 | 122
 | DarkSeaGreen | 8BBC8F | 143 | 188 | 139
 | DarkSlateBlue | 8B3D48 | 72 | 61 | 139
 | DarkSlateGray | 4F4F2F | 47 | 79 | 79
 | DarkTurquoise | D1CE00 | 0 | 206 | 209
 | DarkViolet | D30094 | 148 | 0 | 211
 | DeepPink | 9314FF | 255 | 20 | 147
 | DeepSkyBlue | FFBF00 | 0 | 191 | 255
 | DimGray | 696969 | 105 | 105 | 105
 | DodgerBlue | FF901E | 30 | 144 | 255
 | Firebrick | 2222B2 | 178 | 34 | 34
 | FloralWhite | F0FAFF | 255 | 250 | 240
 | ForestGreen | 228B22 | 34 | 139 | 34
 | Fuchsia | FF00FF | 255 | 0 | 255
 | Gainsboro | DCDCDC | 220 | 220 | 220
 | GhostWhite | FFF8F8 | 248 | 248 | 255
 | Gold | 00D7FF | 255 | 215 | 0
 | Goldenrod | 20A5DA | 218 | 165 | 32
 | Gray | 808080 | 128 | 128 | 128
 | Green | 008000 | 0 | 128 | 0
 | GreenYellow | 2FFFAD | 173 | 255 | 47
 | Honeydew | F0FFF0 | 240 | 255 | 240
 | HotPink | B469FF | 255 | 105 | 180
 | IndianRed | 5C5CCD | 205 | 92 | 92
 | Indigo | 82004B | 75 | 0 | 130
 | Ivory | F0FFFF | 255 | 255 | 240
 | Khaki | 8CE6F0 | 240 | 230 | 140
 | Lavender | FAE6E6 | 230 | 230 | 250
 | LavenderBlush | F5F0FF | 255 | 240 | 245
 | LawnGreen | 00FC7C | 124 | 252 | 0
 | LemonChiffon | CDFAFF | 255 | 250 | 205
 | LightBlue | E6D8AD | 173 | 216 | 230
 | LightCoral | 8080F0 | 240 | 128 | 128
 | LightCyan | FFFFE0 | 224 | 255 | 255
 | LightGoldenrodYellow | D2FAFA | 250 | 250 | 210
 | LightGray | D3D3D3 | 211 | 211 | 211
 | LightGreen | 90EE90 | 144 | 238 | 144
 | LightPink | C1B6FF | 255 | 182 | 193
 | LightSalmon | 7AA0FF | 255 | 160 | 122
 | LightSeaGreen | AAB220 | 32 | 178 | 170
 | LightSkyBlue | FACE87 | 135 | 206 | 250
 | LightSlateGray | 998877 | 119 | 136 | 153
 | LightSteelBlue | DEC4B0 | 176 | 196 | 222
 | LightYellow | E0FFFF | 255 | 255 | 224
 | Lime | 00FF00 | 0 | 255 | 0
 | LimeGreen | 32CD32 | 50 | 205 | 50
 | Linen | E6F0FA | 250 | 240 | 230
 | Magenta | FF00FF | 255 | 0 | 255
 | Maroon | 000080 | 128 | 0 | 0
 | MediumAquamarine | AACD66 | 102 | 205 | 170
 | MediumBlue | CD0000 | 0 | 0 | 205
 | MediumOrchid | D355BA | 186 | 85 | 211
 | MediumPurple | DB7093 | 147 | 112 | 219
 | MediumSeaGreen | 71B33C | 60 | 179 | 113
 | MediumSlateBlue | EE687B | 123 | 104 | 238
 | MediumSpringGreen | 9AFA00 | 0 | 250 | 154
 | MediumTurquoise | CCD148 | 72 | 209 | 204
 | MediumVioletRed | 8515C7 | 199 | 21 | 133
 | MidnightBlue | 701919 | 25 | 25 | 112
 | MintCream | FAFFF5 | 245 | 255 | 250
 | MistyRose | E1E4FF | 255 | 228 | 225
 | Moccasin | B5E4FF | 255 | 228 | 181
 | NavajoWhite | ADDEFF | 255 | 222 | 173
 | Navy | 800000 | 0 | 0 | 128
 | OldLace | E6F5FD | 253 | 245 | 230
 | Olive | 008080 | 128 | 128 | 0
 | OliveDrab | 238E6B | 107 | 142 | 35
 | Orange | 00A5FF | 255 | 165 | 0
 | OrangeRed | 0045FF | 255 | 69 | 0
 | Orchid | D670DA | 218 | 112 | 214
 | PaleGoldenrod | AAE8EE | 238 | 232 | 170
 | PaleGreen | 98FB98 | 152 | 251 | 152
 | PaleTurquoise | EEEEAF | 175 | 238 | 238
 | PaleVioletRed | 9370DB | 219 | 112 | 147
 | PapayaWhip | D5EFFF | 255 | 239 | 213
 | PeachPuff | B9DAFF | 255 | 218 | 185
 | Peru | 3F85CD | 205 | 133 | 63
 | Pink | CBC0FF | 255 | 192 | 203
 | Plum | DDA0DD | 221 | 160 | 221
 | PowderBlue | E6E0B0 | 176 | 224 | 230
 | Purple | 800080 | 128 | 0 | 128
 | Red | 0000FF | 255 | 0 | 0
 | RosyBrown | 8F8FBC | 188 | 143 | 143
 | RoyalBlue | E16941 | 65 | 105 | 225
 | SaddleBrown | 13458B | 139 | 69 | 19
 | Salmon | 7280FA | 250 | 128 | 114
 | SandyBrown | 60A4F4 | 244 | 164 | 96
 | SeaGreen | 578B2E | 46 | 139 | 87
 | SeaShell | EEF5FF | 255 | 245 | 238
 | Sienna | 2D52A0 | 160 | 82 | 45
 | Silver | C0C0C0 | 192 | 192 | 192
 | SkyBlue | EBCE87 | 135 | 206 | 235
 | SlateBlue | CD5A6A | 106 | 90 | 205
 | SlateGray | 908070 | 112 | 128 | 144
 | Snow | FAFAFF | 255 | 250 | 250
 | SpringGreen | 7FFF00 | 0 | 255 | 127
 | SteelBlue | B48246 | 70 | 130 | 180
 | Tan | 8CB4D2 | 210 | 180 | 140
 | Teal | 808000 | 0 | 128 | 128
 | Thistle | D8BFD8 | 216 | 191 | 216
 | Tomato | 4763FF | 255 | 99 | 71
 | Turquoise | D0E040 | 64 | 224 | 208
 | Violet | EE82EE | 238 | 130 | 238
 | Wheat | B3DEF5 | 245 | 222 | 179
 | White | FFFFFF | 255 | 255 | 255
 | WhiteSmoke | F5F5F5 | 245 | 245 | 245
 | Yellow | 00FFFF | 255 | 255 | 0
 | YellowGreen | 32CD9A | 154 | 205 | 50

Applies To

ColorDialog


ColorDepth Property

Description

Sets the color depth of the image list.

Syntax

ColorDepth = Long

Property Value

One of the ColorDepth values. The default is Depth8Bit.

Remarks

When you set the color depth to a new value, the handle for the image list is recreated. All images stored in the control are lost, therefore set ColorDepth prior to populating the image list.

See Also

Applies To: ImageList


Columns Property

Description

Gets the collection of all column headers that appear in the control.

Syntax

Columns

Property Value

The Columns collection that represents all the column headers that appear in the control when the View property is set to Details.

See Also

Applies To: ListView


CommandLine Property

Description

Gets the command line for this process.

Syntax

CommandLine

Property Value

A string containing command line arguments.

Remarks

This property provides access to the program name and any arguments specified on the command line when the current process was started.

The program name can, but is not required to, include path information. Use the GetCommandLineArgs (TBD) method to retrieve the command line information parsed and stored in an array of strings.

Windows NT 4.0, Windows 2000 Platform Note: The name of the executable file does not include the path.

Windows 98, Windows Millennium Edition Platform Note: The name of the executable file includes the path. Long file names (non-8dot3 names) can be shortened to their 8dot3 representation.

See Also

Applies To: System.Environment


ControlBox Property

Description

Gets or sets whether the control box is displayed in the caption bar of the form.

Syntax

ControlBox [ = Boolean ]

Property Value

True if the form displays a control box in the upper left corner of the form; otherwise, false. The default is true.

Remarks

If the ControlBox property is set to true, the control box is displayed in the upper-left corner of the caption bar. The control box is where the user can click to access the system menu.

Note: If your form does not display a control box, the form is still able to close using the ALT+F4 keyboard combination. This behavior differs from dotnet and may change in a future release.

See Also

Applies To: Form


Control.Controls Property

Description

Gets the collection of controls contained within the control.

Syntax

object.Controls

object.Controls(index)

object.Controls("name")

Property Value

A ControlCollection that represents the collection of controls contained within the control. Use Controls(index) to return a control by index number. Use Controls(name) to return a control by name.

See Also

Applies To: Form | GroupBox | Panel | PictureBox | TabPage


Count Property

Description

Gets the total number of elements in the collection.

Syntax

object.Count

Property Value

The total number of elements in the collection.

Remarks

The Count property holds the number of objects assigned to the collection. You can use the Count property value as the upper bounds of a loop to iterate through a collection.

Because the index value of a collection is a zero-based index, you must subtract one from the looping variable. If you do not account for this, you will exceed the upper bounds of the collection and produce undesirable results.

Applies To

Collection | Columns | ControlCollection | GridViewColumnCollection | Images | Items | GridViewRowCollection | ListItemCollection | SelectedItems | TabPages | TreeNodeCollection


Cursor Property

Description

Sets the cursor that is displayed when the mouse pointer is over the control.

Syntax

object.Cursor = Value

object.Cursor = "Filename"

Property Value

Value

One of the following values that specifies the cursor to display when the mouse pointer is over the control.

Value | Name | Description
0 | Default |
1 | Arrow |
2 | Cross |
3 | IBeam |
6 | SizeNESW |
7 | SizeNS |
8 | SizeNWSE |
9 | SizeWE |
10 | UpArrow |
11 | WaitCursor |
12 | No |
13 | AppStarting |
14 | Help |
15 | SizeAll |
16 | Hand |

Filename

A string expression that evaluates to the fully qualified pathname of an CUR, ICO or ANI file.

Example

$Form.Cursor = 13

$Form.Cursor = $System.CursorStyle.AppStarting

$Form.Cursor = "%windir%\cursors\3dgarro.cur"


Default Property

Description

Gets or sets whether the control is automatically clicked when the user presses the ENTER key.

Syntax

Default [ = Boolean ]

Property Value

True if the control is clicked when the user presses the ENTER key; otherwise, false. The default is false.

See Also

Applies To: Button | ToolButton


DefaultExt Property

Description

Gets or sets the default file name extension.

Syntax

DefaultExt [ = String ]

Property Value

A string value specifying the default file name extension. The string should not include the period (.). The default value is an empty string("").

See Also

Applies To: OpenFileDialog | SaveFileDialog


DereferenceLinks Property

Description

Gets or sets a value indicating whether the dialog box returns the location of the file referenced by the shortcut or whether it returns the location of the shortcut (.lnk).

Syntax

DereferenceLinks [ = Boolean ]

Property Value

True if the dialog box returns the location of the file referenced by the shortcut; otherwise, false. The default value is true.

See Also

Applies To: OpenFileDialog


Description Property

Description

Gets or sets the descriptive text displayed above the tree view control in the dialog box.

Syntax

Description [ = String ]

Property Value

The description to display. The default is an empty string ("").

Remarks

The Description property can be used to specify additional information to the user, like instructions.

See Also

Applies To: FolderBrowserDialog


DialogResult Property

Description

The value that is returned to the parent form when the button is clicked.

Syntax

DialogResult [ = Long ]

Property Value

One of the DialogResult values. The default value is None

Remarks

If the value of this property is set to anything other than DialogResult.None, and if the parent form was displayed through the ShowDialog method, clicking the button closes the parent form without your having to hook up any events. The form's DialogResult property is then set to the DialogResult of the button when the button is clicked.

For example, to create a "Yes/No/Cancel" dialog, simply add three buttons and set their DialogResult properties to DialogResult.Yes, DialogResult.No, and DialogResult.Cancel.


DialogResult Property (Form Object)

Description

Gets or sets the dialog result for the form.

Syntax

DialogResult [ = Long ]

Property Value

A DialogResult that represents the result of the form when used as a dialog box.

Remarks

The dialog result of a form is the value that is returned from the form when it is displayed using the ShowDialog method. If the form is displayed as a dialog, setting this property with a value from the DialogResult enumeration sets the value of the dialog result for the form, hides the modal dialog, and returns control to the calling form.

This property is typically set by the DialogResult property of a Button control on the form. When the user clicks the Button control, the value assigned to the DialogResult property of the Button is assigned to the DialogResult property of the form.

When a form is displayed as a modal dialog box, clicking the Close button (the button with an X in the top-right corner of the form) causes the form to be hidden and the DialogResult property to be set to DialogResult.Cancel.


Dock Property

Summary:

Gets or sets which edge of the parent container a control is docked to.

Syntax:

object.Dock [ = Long ]

object.Dock = String

Property Values:

One of the following values. The default is None.

String | Long | Description
None | 0 | The control is not docked.
Top | 1 | The control's top edge is docked to the top of its containing control.
Bottom | 2 | The control's bottom edge is docked to the bottom of its containing control.
Left | 3 | The control's left edge is docked to the left edge of its containing control.
Right | 4 | The control's right edge is docked to the right edge of its containing control.
Fill | 5 | All the control's edges are docked to the all edges of its containing control and sized appropriately.

Remarks:

When a control is docked to an edge of its container, it is always positioned flush against that edge when the container is resized. If more than one control is docked to an edge, the controls appear side by side according to their z-order; controls higher in the z-order are positioned farther from the container's edge.

If Left, Right, Top, or Bottom is selected, the specified and opposite edges of the control are resized to the size of the containing control's corresponding edges. If Fill is selected, all four sides of the control are resized to match the containing control's edges.

StatusBar: A StatusBar should only be docked to the Bottom of a form.


Control.DockPadding Property

Description

Sets the dock padding settings for all edges of the control.

Syntax

object.DockPadding = long

object.DockPadding = long, long, long, long

Property Values

One of the following values:

long - a numeric value that represents the padding for all the edges of a docked control.

long, long, long, long - an array of four numeric values that represents the top, bottom, left and right edge padding of a docked control.

Remarks

This property controls the border inside of this control for docked components.

Example

$Form.DockPadding = 5
$Form.GroupBox1.DockPadding = 2, 2, 2, 2


DropDownStyle Property

Description

Gets or sets the style of the ComboBox.

Syntax

object.DropDownStyle [ = Value ]

Property Value

One of the following values. The default is DropDown.

Value | Name | Description
0 | Simple | The text portion is editable. The list portion is always visible.
1 | DropDown | The text portion is editable. The user must click the arrow button to display the list portion.
2 | DropDownList | The user cannot directly edit the text portion. The user must click the arrow button to display the list portion.

See Also

Applies To: ComboBox


DropDownWidth Property

Description

Gets or sets the width of the drop-down portion of a combo box.

Syntax

DropDownWidth [ = Long ]

Property Value

The width, in pixels, of the drop-down box.

Remarks

If a value has not been set for the DropDownWidth, this property returns the Width of the combo box. The width of the drop-down cannot be smaller than the ComboBox width.

See Also

Applies To: ComboBox


Enabled Property

Description

Gets or sets whether the object can respond to user interaction.

Syntax

Enabled [ = Boolean ]

Property Value

True if the object can respond to user interaction; otherwise, false. The default is true.


Environment Property

Description

Returns an object which provides information about, and means to manipulate, the current environment and platform.

Syntax

Environment

Property Values

An Environment object.

See Also

Applies To: System


EventArgs Property

Description

Gets the event arguments that are associated with the action that raised an event.

Syntax

object.EventArgs

Property Value

An EventArgs that contains additional event data that is specific to the type of event.

See Also

Applies To: System


FileName Property

Description

Gets or sets a string containing the file name selected in the file dialog box.

Syntax

FileName [ = String ]

Property Value

A string value containing the file name selected in the file dialog box. The default value is an empty string ("").

See Also

Applies To: OpenFileDialog | SaveFileDialog


Filter Property

Description

Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

Syntax

Filter [ = String ]

Property Value

A string that contains information about the file filtering options available in the dialog box.

Remarks

For each filtering option, the filter string contains a description of the filter, followed by the vertical bar (|) and the filter pattern. The strings for different filtering options are separated by the vertical bar.

The following is an example of a filter string: "Text files (*.txt)|*.txt|All files (*.*)|*.*"

You can add several filter patterns to a filter by separating the file types with semicolons. For example: "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*"

See Also

Applies To: OpenFileDialog | SaveFileDialog


FilterIndex Property

Description

Gets or sets the index of the filter currently selected in the file dialog box.

Syntax

FilterIndex [ = Long ]

Property Value

The index of the filter currently selected in the file dialog box. The first filter is at index one. The default value is one.

See Also

Applies To: OpenFileDialog | SaveFileDialog


FlatStyle Property

Description

Gets or sets the flat style appearance of the control.

Syntax

object.FlatStyle [ = Value ]

Property Value

One of the following values:

Value | Name | Description
0 | Flat | The control appears flat.
1 | Popup | ToolButton only: The control appears flat until the mouse pointer moves over it, at which point it appears three-dimensional.
2 | Standard | The control appears normal.

See Also

Applies To: Button | CheckBox | RadioButton | ToolButton


Focused Property

Description

Gets or sets whether the object has the focus.

Syntax

Focused [ = Boolean ]

Property Value

True if the object has the focus; otherwise, false.

Remarks

Because a ListView control has no directly editable areas, except items it displays, when the ListView control has focus, an item within the ListView displays the focus reticle around its item text. Typically, the last selected item in the ListView control is the focused item. Although an item may be the one displaying the focus reticle, it may not actually be a selected item in the ListView. You can use this property to determine if the item is currently the focused item in the ListView control that contains it. If the Item is not associated with a ListView control, then this property will return false.

See Also

Applies To: Item


FocusedItem Property

Description

Gets the item in the control that currently has the focus.

Syntax

FocusedItem

Property Value

An Item object that represents the item that has the focus. If no item has the focus, a empty reference is returned.

See Also

Applies To: ListView


Font Property

Description

Gets or sets the font of the text displayed by the control.

Syntax

Font [ = Font ]

Property Value

The Font object to apply to the text displayed by the control.

Remarks

The Font property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control.


FontBold Property

Description

Gets or sets whether the font style is bold.

Syntax

object.FontBold [ = Boolean ]

Property Value

True if the font is bold; otherwise, false. The default is false.


FontItalic Property

Description

Gets or sets whether the font style is italic.

Syntax

object.FontItalic [ = Boolean ]

Property Value

True if the font is italic; otherwise, false. The default is false.


FontName Property

Description

Get or sets the face name of font style used by this object.

Syntax

object.FontName [ = String ]

Property Value

A string representation of the face name used by this object.

Example

$TextBox.FontName = "Courier New"


FontSize Property

Description

Gets or sets the size of the font style used by the object.

Syntax

object.FontSize [ = Long ]

Property Value

The size of the font, in points.


FontStrikeout Property

Description

Gets or sets whether the font style has a horizontal line through it.

Syntax

object.FontStrikeout [ = Boolean ]

Property Value

True if the font has a horizontal line through it; otherwise, false. The default is false.


FontUnderline Property

Description

Gets or sets whether the font style is underlined.

Syntax

object.FontUnderline [ = Boolean ]

Property Value

True if the font style is underlined; otherwise, false. The default is false.


ForeColor Property

Summary:

Gets or sets the foreground color of the object.

Syntax:

object.ForeColor [ = long ]

object.ForeColor = long, long, long

object.ForeColor = string

Property Values:

One of the Color values.


FormBorderStyle Property

Description

Gets or sets the border style of the form.

Syntax

object.FormBorderStyle [ = Long ]

Property Value

One of the following values:

Setting | Long | Description
None | 0 | No border.
FixedSingle | 1 | A fixed, single-line border.
Fixed3D | 2 | A fixed, three-dimensional border.
FixedDialog | 3 | A thick, fixed dialog-style border.
Sizable | 4 | A resizable border
FixedToolWindow | 5 | A tool window border that is not resizable.
SizableToolWindow | 6 | A resizable tool window border.

Remarks

The border style of the form determines how the outer edge of the form appears. In addition to changing the border display for a form, certain border styles prevent the form from being sized. For example, the FixedDialog border style changes the border of the form to that of a dialog box and prevents the form from being resized. The border style can also affect the size or availability of the caption bar section of a form.

See Also

Applies To: Form


FullRowSelect Property

Description

Gets or sets a value indicating whether the selection highlight spans the width of the control.

Syntax

object.FullRowSelect [ = Boolean ]

Property Value

ListView: True if clicking an item selects the item and all its subitems; false if clicking an item selects only the item itself. The default is true.

TreeView: True if the selection highlight spans the width of the tree view control; otherwise, false. The default is false.

Remarks:

TreeView: When FullRowSelect is true, a selection highlight spans the entire width of the tree view control, rather than the width of just the tree node label. The FullRowSelect property is ignored if ShowLines is set to true.

See Also

Applies To: ListView | TreeView


GridLines Property

Summary:

Gets or sets a value indicating whether grid lines appear between the rows and columns containing the items and subitems in the control.

Syntax:

object.GridLines [ = boolean ]

Property Value

True if grid lines are drawn around items and subitems; otherwise, false. The default is false.

See Also:

Applies To: ListView


HeaderStyle Property

Description

Gets or sets the column header style.

Syntax

object.HeaderStyle [ = Value ]

Property Value

One of the following values:

Value | Name | Description
0 | None | The column header is not displayed in report view.
1 | Nonclickable | The column headers do not respond to the click of a mouse.
2 | Clickable | The column headers function like buttons and can carry out an action, such as sorting, when clicked.

See Also

Applies To: ListView


object.HeaderText Property

Summary:

Gets or sets the text on the column's header.

Syntax:

object.HeaderText [ = text ]

Property Values:

A string with the desired text. The default is an empty string ("").

See Also:

Applies To: GridViewColumn


Height Property

Description

Gets or sets the height of the object.

Syntax

object.Height [ = Long ]

Property Value

The height of the object, in pixels.

Example

$Form.Height = 480

Remarks

Bitmap/Icon: This property is read-only.


HideSelection Property

Description

Gets or sets a value indicating whether the selection in the control remains highlighted even when the control loses focus.

Syntax

object.HideSelection [ = Boolean ]

Property Value

True if the selection does not appear highlighted when the control loses focus; false if the selection still appears highlighted when the control loses focus. The default is true.

Remarks

When this property is set to false, the selection in the control remains highlighted in a different color than the current selection color specified by the operating system when the control loses focus. You can use this property to keep items that are selected by the user visible when the user clicks a different control on the form or moves to a different window.

See Also

Applies To: ListView | TextBox | TreeView


HotBackColor Property

Description

Gets or sets the background color when the the mouse pointer is over the control.

Syntax

HotBackColor [ = Long ]

HotBackColor = Long, Long, Long

HotBackColor = String

Property Value

One of the Color property values.

See Also

Applies To: ToolButton


HotForeColor Property

Description

Gets or sets the foreground color when the the mouse pointer is over the control.

Syntax

HotForeColor [ = Long ]

HotForeColor = Long, Long, Long

HotForeColor = String

Property Value

One of the Color property values.

See Also

Applies To: ToolButton


HotTracking Property

Description

Gets or sets a value indicating whether a tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it.

Syntax

object.HotTracking [ = Boolean ]

Property Value

True if a tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it; otherwise, false. The default is false.

Remarks

When the HotTracking property is set to true, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The Underline font style is applied to the Font and the ForeColor is set to blue to make the label appear as a link. The appearance is not controlled by the internet settings of the user's operating system.

See Also

Applies To: TreeView


Html Property

Description

Gets or sets the HTML document displayed by the object.

Syntax

object.Html [ = String ]

Property Value

A string representing the HTML document displayed by the object.

Remarks

Kixforms scans the HTML document and ignores most of the tags (the ones that it does not understand). It picks out a few of them and uses them as formatting codes. Some tag attributes and even a few style attributes are supported.

The following tags are supported:

<BODY>...</BODY>
The HTML body. The tag supports the following attributes: BGCOLOR="#rrggbb", LEFTMARGIN=n, RIGHTMARGIN=n. You can omit the <BODY>, <HEAD> and <HTML> tags if they are not needed.

<B>...</B>
Formats text in bold.

<I>...</I>
Formats text in italics.

<U>...</U>
Prints underlined text.

<FONT>...</FONT>
The font tag with several attributes, such as FACE="facename", SIZE=n and COLOR="#rrggbb".

<BR>
A single line-break.

<P>
The paragraph tag.

<SPAN>...</SPAN>
A formatted text strip. Supports the following attributes: STYLE=' color:"#rrggbb" background-color:"#rrggbb" '

<DIV>...</DIV>
A line-breaking text strip. Supports the following attributes: ALIGN="left/right/center" and STYLE=' color:"#rrggbb" background-color:"#rrggbb" '


Icon Property

Description

Sets the icon that is displayed by the object.

Syntax

object.Icon [ = Icon ]

object.Icon = Long

object.Icon = String

Property Value

Icon: An Icon that represents the icon for the object.

Long: A numeric expression that evaluates to the index number of a builtin icon. Use the icon viewer script (icons.kix) for an up-to-date list of builtin icons.

String: A string expression that evaluates to the the fully qualified path of an ICO file.


Icon(2) Property

Description

Gets or sets the icon that is displayed by the object.

Syntax

Icon [ = Icon ]

Property Value

An Icon that represents the icon for the object.

See Also

Applies To: NotifyIcon


Image Property

Description

Gets or sets the image that is displayed on a control.

Syntax

object.Image [ = Bitmap ]

object.Image = "Filename"

Property Value

Bitmap - the Bitmap object to display.

Filename - a string expression that evaluates to the name of a graphics file.

Example

$Label.Image = ".\picture.jpg"

Applies To

Label | PictureBox | ToolButton


ImageAlign Property

Description

Gets or sets the alignment of an image that is displayed in the control.

Syntax

object.ImageAlign [ = Long ]

object.ImageAlign = "String"

Property Value

One of the following values:

Long | String | Description
1 | TopLeft | Image is vertically aligned at the top, and horizontally aligned on the left.
2 | TopCenter | Image is vertically aligned at the top, and horizontally aligned at the center.
4 | TopRight | Image is vertically aligned at the top, and horizontally aligned on the right.
16 | MiddleLeft | Image is vertically aligned in the middle, and horizontally aligned on the left.
32 | MiddleCenter | Image is vertically aligned in the middle, and horizontally aligned at the center.
64 | MiddleRight | Image is vertically aligned in the middle, and horizontally aligned on the right.
256 | BottomLeft | Image is vertically aligned at the bottom, and horizontally aligned on the left.
512 | BottomCenter | Image is vertically aligned at the bottom, and horizontally aligned at the center.
1024 | BottomRight | Image is vertically aligned at the bottom, and horizontally aligned on the right.

Remarks

This property enables you to align an image within the boundaries of the control to ensure that the image is properly displayed. You can add an image to a control using the Image property. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image.

See Also

Applies To: Label


ImageIndex Property

Summary:

Gets or sets the image-list index value of the default image that is displayed by the object.

Syntax:

object.ImageIndex [ = long ]

Property Values:

The zero-based index of the image in the ImageList that is displayed by the object.

Item: The zero-based index of the image in the LargeImageList or SmallImageList that is displayed for the item.

See Also:

Applies To: Item | MenuItem | TabPage | TreeView | TreeNode


ImageList Property

Summary:

Gets or sets the ImageList that contains the images to display on the control.

Syntax:

object.ImageList [ = ImageList ]

Property Values:

The ImageList object that contains the images to display on the control. The default is an empty reference.

See Also

Applies To: ContextMenu | MainMenu | TabControl


Images Property

Description

Returns an Images collection that represents all the images in the specified object.

Syntax

Images

Remarks

Use Images(index), where index is the images's index number, to return a specific image from the collection.


ImageSize Property

Description

Gets or sets the size of the images in the control.

Syntax

ImageSize [ = Size ]

ImageSize = Width, Height

Property Value

Size - a Size object that represents the height and width of the images, in pixels.

Width, Height - an array of two numbers specifying the width and height of the images, in pixels. The default is 16 by 16.


Object.Index Property

Summary:

Gets the position of the object in the collection.

Syntax:

object.Index

Property Values:

A zero-based index value that represents the position of the object in the collection.


InitialDirectory Property

Description

Gets or sets the initial directory displayed by the file dialog box.

Syntax

InitialDirectory [ = String ]

Property Value

A string containing the initial directory displayed by the file dialog box. The default is an empty string ("").


Interval Property

Description

Gets or sets the time, in milliseconds, between timer ticks.

Syntax

Interval [ = Long ]

Property Value

The number of milliseconds between each timer tick. To stop the timer, set the value to zero.

Remarks

To get the number of seconds in the interval, divide this number by 1,000.


Item Property

Summary:

Returns the object at the specified index in the collection.

Syntax:

object.Item(index)

Property Values:

The object at the specified index in the collection.

See Also:

Applies To: Collection | ListItemCollection


Item Property (ControlCollection Object)

Description

Returns the control with the specified index or name in the collection.

Syntax

object.Item(index)

object.Item("name")

Property Value

The control with the specified index or name in the collection.

Applies To

ControlCollection


ItemHeight Property (ComboBox Control)

Description

Gets or sets the height of an item in the combo box.

Syntax

object.ItemHeight [ = Long ]

Property Value

The height, in pixels, of an item in the combo box.

Example

$ComboBox.ItemHeight = 10 ; pixels

See Also

ComboBox


Items Property

Description

Returns an Items collection that represents all the items in the specified control.

Syntax

Items

Remarks

Use Items(index), where index is the item index number, to return a single Item from the collection.


KeyCode Property

Note

The keycode table is currently under development and will be updated in subsequent releases.

Description

Gets the keyboard code for the OnKeyDown event.

Syntax

KeyCode

Property Value

One of the following values:

Value | Key
8 | BACKSPACE
9 | TAB
12 | CLEAR
13 | ENTER
16 | SHIFT
17 | CONTROL
18 | ALT
19 | PAUSE
20 | CAPSLOCK
27 | ESCAPE
32 | SPACEBAR


LabelEdit Property

Description

Gets or sets whether the user can edit the labels of items.

Syntax

LabelEdit [ = Boolean ]

Property Value

True if the user can edit the labels of items at run time; otherwise, false. The default is false.

Remarks

When the LabelEdit property is set to true, the user is able to modify the text of an item by clicking the item text to select it and then clicking the item text again to put the label text into edit mode. The user can then modify or replace the item's text label. The text of subitems cannot be modified if this property is set to true. To change the text of subitems, you can display a dialog box to users when they double-click a subitem in the control.


LargeChange Property

Description

Gets or sets a value to be added to or subtracted from the Value property when the slider is moved a large distance.

Syntax

object.LargeChange [ = Long ]

Property Value

A numeric value. The default value is 10.

Remarks

When the user presses the PAGE UP or PAGE DOWN key or clicks in the scroll bar track on either side of the scroll box, the Value property changes according to the value set in the LargeChange property. Note: The ScrollBar must have the TabStop property enabled to recieve keyboard input.

You might consider setting the LargeChange value to a percentage of the Height (for a vertically oriented scroll bar) or Width (for a horizontally oriented scroll bar) values. This keeps the distance your scroll bar moves in proportion to its size.

See Also

Applies To: ScrollBar


LargeImageList Property

Description

Gets or sets the image list to use when displaying items as large icons in the specified control.

Syntax

LargeImageList [ = ImageList ]

Property Value

The ImageList that contains the icons to use when the View property is set to LargeIcon. The default is an empty reference.


LastUserInput Property

Description

Returns the time of the last input event.

Syntax

object.LastUserInput

Property Value

Tick count when the last input event was received.

See Also

Applies To: System.Environment


Location Property

Location

Gets or sets the coordinates of the upper-left corner of this object.

Syntax

Location [ = Point ]

Location = Left, Top

Property Value

Point

A Point that represents the x-coordinate and y-coordinate of the control.

Left, Top

An array of two numbers specifying the left and top coordinates of the control.

Example

$Form.Location = 200, 200

$Form.Location = $System.Point(200, 200)


Left Property

Description

Gets or sets the x-coordinate of the object's left edge.

Syntax

Left [ = Long ]

Property Value

The x-coordinate of the control's left edge, in pixels.

Example

$Form.Left = 100

To override the default location of a Form when it displays for the first time, set the StartPosition property of the form to FormStartPosition.Manual. For example:

$Form.Left = 10
$Form.Top = 10
$Form.StartPosition = $System.FormStartPosition.Manual


List Property

Description

Sets all the items in the list portion of the control.

Syntax

List = Variant, Variant, ...

Property Value

An array of variant values to load into the list. Can be an array of strings or numbers or a both.

Remarks

This property removes all existing items from the list before inserting the new values.

Example

The following example loads a ListBox with the numbers zero thru five.

$ListBox.List = 0,1,2,3,4,5


ListCount Property

Description

Returns the number of items in the list.

Syntax

ListCount

Property Value

A numeric value specifying the number of items in the list.


ListIndex Property

Description

Gets or sets the index of the currently selected item in the list.

Syntax

ListIndex [ = Long ]

Property Value

The zero-based index of the currently selected item in the list.


ListWidth Property

Description

Gets or sets the width by which the horizontal scroll bar of the ListBox can scroll.

Syntax

ListWidth [ = Long ]

Property Value

The width, in pixels, that the horizontal scroll bar can scroll the control. The default is zero.


Mask Property (MaskedTextBox Control)

Description

Gets or sets the input mask to use at run time.

Syntax

object.Mask [ = "String" ]

Property Value

A String representing the current mask. The default value is the empty string which dis-allows any input.

Mask must be a string composed of one or more of the masking elements, as shown in the following table:

Masking Element | Description
0 | Digit, required. This element will accept any single digit between 0 and 9.
9 | Digit or space, optional.
L | Letter, required. Restricts input to the ASCII letters a-z and A-Z. This mask element is equivalent to [a-zA-Z] in regular expressions.
[abc...] | Match set. Restricts input to the characters contained in the set.
[a-z...] | Match range. Restricts input to the characters contained in the range.
< | Shift down. Converts all characters that follow to lowercase.
> | Shift up. Converts all characters that follow to uppercase.
| | Disable a previous shift up or shift down.
\ | Escape. Escapes a mask character, turning it into a literal. "\\" is the escape sequence for a backslash.
All other characters | Literals. All non-mask elements will appear as themselves within MaskedTextBox. Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user.

Remarks

If you change a mask when MaskedTextBox already contains user input filtered by a previous mask, MaskedTextBox will attempt to migrate that input into the new mask definition.

See Also:

Applies To: MaskedTextBox


MaximizeBox Property

Description

Gets or sets whether the maximize button is displayed in the caption bar of the form.

Syntax

MaximizeBox [ = Boolean ]

Property Value

True to display a maximize button for the form; otherwise, false. The default is true.

Remarks

A maximize button enables users to enlarge a window to full-screen size. To display a maximize button, you must also set the form's FormBorderStyle property to either FixedSingle, Sizable, Fixed3D, or FixedDialog.

A maximize button automatically becomes a restore button when a window is maximized. Minimizing or restoring a window automatically changes the restore button back to a maximize button.


Maximum Property

Description

Gets or sets the maximum value for the control.

Syntax

Maximum [ = Long ]

Property Value

The maximum value for the control. The default value depends on the derived class.


MaximumSize Property

Summary:

Gets or sets the maximum size that a Form be resized to.

Syntax:

object.MaximumSize [ = size ]

object.MaximumSize = width, height

Property Values:

size

A Size object that represents the maximum width and height that a form can be resized to.

width, height

An array of two numbers representing the maximum width and height that a form can be resized to.

Example

$Form.MaximumSize = 640, 480

$Form.MaximumSize = $System.Size(640, 480)

Remarks

This property enables you to limit the size of a form to a specified maximum size. You can use this feature to prevent a user from sizing a window to an undesirable size. If this property is set to a size that is 0 in height and 0 in width, the form will have no maximum size beyond the limits set by Windows.


MaxLength Property

Description

Gets or sets the maximum number of characters the user can type into the control.

Syntax

object.MaxLength [ = long ]

Property Value

The number of characters that can be entered into the control. The default is zero.

Remarks

TextBox: When this property is set to zero, the maximum length of the text that can be entered in the control is limited only by available memory. You can use this property to restrict the length of text entered in the control for values such as postal codes and telephone numbers. You can also use this property to restrict the length of text entered when the data is to be entered in a database. You can limit the text entered into the control to the maximum length of the corresponding field in the database.

ComboBox: Limits only the text the user can enter. It has no effect on any text already in the edit control when the property is set, nor does it affect the length of the text copied to the edit control when a string in the list box is selected. The default limit to the text a user can enter in the edit control is 30,000 characters.

See Also

Applies To: ComboBox | TextBox


Menu Property

Description

Returns a MainMenu object that represents the main menu of the form.

Syntax

Menu

Example

The following example adds two MenuItem objects to the MainMenu of a form. This example assumes that you have a Form created that is named Form1.

Function CreateMyMainMenu()

 Dim $menuItem1, $menuItem2

 $menuItem1 = $Form1.Menu.MenuItems.Add("File")
 $menuItem2 = $Form1.Menu.MenuItems.Add("Edit")

EndFunction


MenuItems Property

Summary:

Returns the collection of MenuItem objects associated with the menu.

Syntax:

object.MenuItems

Property Values:

A MenuItemCollection that represents the list of MenuItem objects stored in the menu.

See Also:

Applies To: ContextMenu | MainMenu | MenuItem


MinimizeBox Property

Summary:

Gets or sets whether the minimize button is displayed in the caption bar of the form.

Syntax:

object.MinimizeBox [ = Boolean ]

Property Values:

True to display a minimize button for the form; otherwise, false. The default is true.

Remarks:

A minimize button enables users to minimize a window to an icon. To display a minimize button, you must also set the form's FormBorderStyle property to either FixedSingle, Sizable, Fixed3D, or FixedDialog.


Minimum Property

Description

Gets or sets the minimum value for the control.

Syntax

Minimum [ = Long ]

Property Value

The minimum value for the control. The default value is zero.


MinimumSize Property

Description

Sets the minimum size that a form can be resized to.

Syntax

MinimumSize [ = Size ]

MinimumSize = Width, Height

Property Value

Size

A Size object that represents the minimum width and height that a form can be resized to.

Width, Height

An array of two numbers representing the minimum width and height that a form can be resized to.

Example

$Form.MinimumSize = 640, 480

$Form.MinimumSize = $System.Size(640, 480)

Remarks

This property enables you to limit the size of a form to a specified minimum size. You can use this feature to prevent a user from sizing a window to an undesirable size. If this property is set to a size that is 0 in height and 0 in width, the form will have no minimum size beyond the limits set by Windows.


Modified Property

Description

Gets or sets a value that indicates whether the control has been modified by the user since the control was created or its contents were last set.

Syntax

Modified [ = Boolean ]

Property Value

True if the control's contents have been modified; otherwise, false. The default is false.

Remarks

You can use this property to determine if the user has modified the contents of the text box control. You can also set this property in code to indicate that changes were made to the text box control by the application. This property can be used by validation and data-saving methods to determine if changes were made in a text box control so the changed contents can be validated or saved.


MouseButton Property

Description

Returns a value indicating which of the mouse buttons is in a pressed state.

Syntax

MouseButton

Property Value

A bitwise combination of the following values:
Value | Member | Description
0 | None | No mouse button was pressed.
1 | Left | The left mouse button was pressed.
2 | Right | The right mouse button was pressed.
4 | Middle | The middle mouse button was pressed.


MouseX Property

Description

Returns the x-coordinate of the mouse cursor.

Syntax

MouseX

Property Value

A numeric value specifying the x-coordinate of the mouse cursor, in pixels.


MouseY Property

Description

Gets the y-coordinate of the mouse cursor.

Syntax

MouseY

Property Value

A numeric value specifying the the y-coordinate of the mouse cursor, in pixels.


Multiline Property

Description

Gets or sets whether this is a multiline control.

Syntax

Multiline [ = Boolean ]

Property Value

True if the control is a multiline control; otherwise, false.

Remarks

A multiline text box allows you to display more than one line of text in the control. If the WordWrap property is set to true, text entered into the multiline text box is wrapped to the next line in the control. If the WordWrap property is set to false, text entered into the multiline text box control will be displayed on the same line until a newline character is entered.

You can add scroll bars to a text box using the ScrollBars property to display horizontal and/or vertical scroll bars. This allows the user to scroll through the text that extends beyond the dimensions of the control.


Multiline Property (TabControl Object)

Description

Gets or sets a value indicating whether more than one row of tabs can be displayed.

Syntax

Multiline [ = Boolean ]

Values

True if more than one row of tabs can be displayed; otherwise, false. The default is false.

Remarks

If Multiline is false, only one row of tabs is displayed, even if all the tabs do not fit in the available space. In that case, however, arrows are displayed that allow the user to navigate to the undisplayed tabs.


MultiSelect Property

Summary:

Gets or sets whether multiple items can be selected at one time.

Syntax:

object.MultiSelect [ = boolean ]

Property Values:

True if multiple items can be selected at one time; otherwise, false. The default is false.

Remarks

When MultiSelect is true, multiple items can be selected in the control. To select multiple items, the user must hold down the CTRL key while clicking the items to select. Consecutive items can be selected by clicking the first item to select and then, while holding down the SHIFT key, clicking the last item to select.

ListView: To determine which items are selected, use the SelectedItems property.


Name Property

Description

Gets or sets the name of the control.

Syntax

object.Name [ = String ]

Pproperty Value

The name of the control. The default is the class name of the object, followed by a unique number.

Remarks

The Name property can be used at run time to evaluate the object by name rather than type and programmatic name. Because the Name property returns a String type, it can be evaluated in case-style logic statements.


Name Property (Font Object)

Description

Gets or sets the face name of this Font object.

Syntax

Name [ = String ]

Property Value

A string representation of the face name of this Font object.

Example

$Font.Name = "Verdana"

See Also

Applies To: Font


Node Property

Description

Gets the tree node that has been checked, expanded, collapsed, or selected.

Syntax

object.Node

Property Value

The TreeNode that has been checked, expanded, collapsed, or selected.

See Also

Applies To: EventArgs


Nodes Property

Description

Gets the collection of tree nodes that are assigned to the tree view control.

Syntax

object.Nodes( index )

Property Value

A TreeNodeCollection that represents the tree nodes assigned to the tree view control. Use Nodes(index), where index is the node index number, to return a specific TreeNode from the collection.

Remarks

The Nodes property holds a collection of TreeNode objects, each of which has a Nodes property that can contain its own TreeNodeCollection. This nesting of tree nodes can make it difficult to navigate a tree structure, but the FullPath property makes it easier to determine your location within the tree structure.


Opacity Property

Description

Gets or sets the opacity level of the form.

Syntax

Opacity [ = Long ]

Property Value

The level of opacity for the form. The default is 100.

Remarks

This property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100, the entire form, including borders, is made more transparent. Setting this property to a value of 0 makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the Opacity property to a value of 0 and gradually increasing the value until it reaches 100.

Windows 2000 Platform Note: This property has no effect on platforms that cannot display layered windows.


Orientation Property

Summary:

Gets or sets the horizontal or vertical orientation of the control.

Syntax

object.Orientation [ = Value ]

Property Value

One of the following values:

Value | Name | Description
0 | Horizontal | The control is oriented horizontally.
1 | Vertical | The control is oriented vertically.


OverwritePrompt Property

Description

Gets or sets a value indicating whether the OpenFileDialog box displays a warning if the user specifies a file name that already exists.

Syntax

OverwritePrompt [ = Boolean ]

Property Value

True if the dialog box prompts the user before overwriting an existing file if the user specifies a file name that already exists; false if the dialog box automatically overwrites the existing file without prompting the user for permission. The default value is true.

See Also

Applies To: OpenFileDialog


Panel1 Property

Summary:

Gets the left or top Panel of the SplitContainer, depending on Orientation.

Syntax:

object.Panel1

Property Values:

If Orientation is Vertical, the left Panel of the SplitContainer. If Orientation is Horizontal, the top Panel of the SplitContainer.

See Also:

Applies To: SplitContainer


Panel1Collapsed Property

Summary:

Gets or sets a value determining whether Panel1 is collapsed or expanded.

Syntax:

object.Panel1Collapsed

Property Values:

True if Panel1 is collapsed; otherwise, false. The default is false.

See Also:

Applies To: SplitContainer


Panel2 Property

Summary:

Gets the right or bottom Panel of the SplitContainer, depending on Orientation.

Syntax:

object.Panel2

Property Values:

If Orientation is Vertical, the right Panel of the SplitContainer. If Orientation is Horizontal, the bottom Panel of the SplitContainer.

See Also:

Applies To: SplitContainer


Panel2Collapsed Property

Summary:

Gets or sets a value determining whether Panel2 is collapsed or expanded.

Syntax:

object.Panel2Collapsed

Property Values:

True if Panel2 is collapsed; otherwise, false. The default is false.

See Also:

Applies To: SplitContainer


Parent Property

Description

Gets the parent container of the control.

Syntax

Parent

Property Value

The parent container of the control. If no parent exists, returns an empty reference.


Parent Property (TreeNode Object)

Description

Gets the parent tree node of the current tree node.

Syntax

object.Parent

Property Value

A TreeNode that represents the parent of the current tree node.

Remarks

If the tree node is at the root level, the Parent property returns an empty reference.


PasswordChar Property

Description

Gets or sets the character used to mask characters of a password in a single-line TextBox control.

Syntax

PasswordChar [ = String ]

Property Value

The character used to mask characters entered in a single-line TextBox control. Set the value of this property an empty string ("") if you do not want the control to mask characters as they are typed. Equals ("") by default.

Remarks

If the Multiline property is set to true, setting the PasswordChar property has no visual effect. When the PasswordChar property is set to true, cut, copy, and paste actions in the control using the keyboard are not allowed, regardless of whether the Multiline property is set to true or false.

See Also

Applies To: TextBox


PI Property

Description

Represents the ratio of the circumference of a circle to its diameter, specified by the constant, p.

Syntax

PI

Property Value

The value of this property is 3.14159265358979

See Also

Applies To: Math


Picture Property

Description

Sets the bitmap for the specified object.

Syntax

Picture = String

Property Value


PromptChar Property (MaskedTextBox Control)

Description

Gets or sets the character used to represent the absence of user input in MaskedTextBox.

Syntax

object.PromptChar [ = "String" ]

Property Value

The character used to prompt the user for input. The default is an underscore (_).

Remarks

PromptChar will be displayed in MaskedTextBox for any mask position that the user has not yet filled in.

See Also:

Applies To: MaskedTextBox


Pushed Property

Description

Gets or sets a value indicating whether a toggle-style control is currently in the pushed state.

Syntax

Pushed [ = Boolean ]

Property Value

True if a toggle-style control is currently in the pushed state; otherwise, false. The default is false.

See Also

Applies To: ToolButton


ReadOnly Property

Description

Gets or sets a value indicating whether text in the object is read-only.

Syntax

object.ReadOnly [ = Boolean ]

Property Value

True if the control is read-only; otherwise, false. The default is false.

Remarks:

When this property is set to true, the contents of the object cannot be changed by the user at runtime. With this property set to true, you can still set the value of the Text property in code.

TextBox: You can use this feature instead of disabling the control with the Enabled property to allow the contents to be copied.

See Also:

Applies To: TextBox


ReadOnlyChecked Property

Description

Gets or sets a value indicating whether the read-only check box is selected.

Syntax

ReadOnlyChecked [ = Boolean ]

Values

True if the read-only check box is selected; otherwise, false. The default value is false.

Remarks

The ShowReadOnly property must be set before in order for the read-only check box to appear in the dialog box.

See Also

Applies To: OpenFileDialog


Resizable Property

Summary:

Gets or sets a value indicating whether the object can be resized.

Syntax:

object.Resizable [ = boolean ]

Property Values:

True if the object can be resized; otherwise, false.

See Also:

Applies To: Form | GridViewColumn


RestoreDirectory Property

Description

Gets or sets a value indicating whether the dialog box restores the current directory before closing.

Syntax

RestoreDirectory [ = Boolean ]

Property Value

True if the dialog box restores the current directory to its original value if the user changed the directory while searching for files; otherwise, false. The default value is false.


Right Property

Description

Gets or sets the distance between the right edge of the control and the left edge of its container.

Syntax

Right [ = Long ]

Property Value

The distance between the right edge of the control and the left edge of its container. The value of the Right property is equal to the sum of the Left property value and the Width property value.


RootFolder Property

Description

Gets or sets the root folder where the browsing starts from.

Syntax

RootFolder [ = Long ]

Property Value

One of the following values:

Name | Description | Value
ApplicationData | The directory that serves as a common repository for application-specific data for the current roaming user. A roaming user works on more than one computer on a network. A roaming user's profile is kept on a server on the network and is loaded onto a system when the user logs on. | 26
CommonApplicationData | The directory that serves as a common repository for application-specific data that is used by all users. | 35
CommonProgramFiles | The directory for components that are shared across applications. | ?
Cookies | The directory that serves as a common repository for Internet cookies. | 33
Desktop | The logical Desktop rather than the physical file system location. | 0
DesktopDirectory | The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder. | 16
Favorites | The directory that serves as a common repository for the user's favorite items. | 6
History | The directory that serves as a common repository for Internet history items. | 34
InternetCache | The directory that serves as a common repository for temporary Internet files. | 32
LocalApplicationData | The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user. | 26
MyComputer | The "My Computer" folder. | 17
MyMusic | The "My Music" folder. | 13
MyPictures | The "My Pictures" folder. | 39
Personal | The directory that serves as a common repository for documents. | ?
ProgramFiles | The program files directory. | 38
Programs | The directory that contains the user's program groups. | 2
Recent | The directory that contains the user's most recently used documents. | 8
SendTo | The directory that contains the Send To menu items. | 9
StartMenu | The directory that contains the Start menu items. | 11
Startup | The directory that corresponds to the user's Startup program group. The system starts these programs whenever a user logs on or starts Windows NT or later, or starts Windows 98. | 7
System | The System directory. | 37
Templates | The directory that serves as a common repository for document templates. | 21

Remarks

Only the specified folder and any subfolders that are beneath it will appear in the dialog box and be selectable. The SelectedPath property, along with RootFolder, determines what the selected folder will be when the dialog box is displayed, as long as SelectedPath is an absolute path that is a subfolder of RootFolder (or more accurately, points to a subfolder of the shell namespace represented by RootFolder).


Screen Property

Description

Returns an object representing the display device on a single system.

Syntax

Screen

Property Value

A Screen object representing the display device.

Example

$ScreenWidth = $System.Screen.Bounds.Width

See Also

Applies To: System


ScrollBars Property

Description

Gets or sets which scroll bars should appear in a multiline control.

Syntax

object.ScrollBars [ = Long ]

object.ScrollBars = String

Property Value

One of the following values. The default is None.

String | Long | Description
None | 0 | No scroll bars are shown.
Horizontal | 1 | Only horizontal scroll bars are shown.
Vertical | 2 | Only vertical scroll bars are shown.
Both | 3 | Both horizontal and vertical scroll bars are shown.

Remarks

Horizontal scroll bars will not be shown if the WordWrap property is set to true, regardless of the value of the ScrollBars property.


Selected Property

Description

Gets or sets whether the object is selected.

Syntax

Selected [ = Boolean ]

Property Value

True if the object is selected; otherwise, false.

See Also

Applies To: Item


SelectedImageIndex Property

Summary:

Gets or sets the image list index of the image that is displayed when an object is selected.

Syntax:

object.SelectedImageIndex [ = long ]

Property Values:

A zero-based index value that represents the position of an image in an ImageList.

See Also

Applies To: TreeView | TreeNode


SelectedIndex Property

Description

Gets or sets the index of the currently selected item in the control.

Syntax

object.SelectedIndex [ = Long ]

Property Value

The zero-based index of the currently selected item. The default is -1, which is also the value if no item is selected.

See Also

Applies To: ComboBox | TabControl


SelectedItems Property

Description

Returns a SelectedItems collection that represents all the selected items in the control. If no items are selected, returns an empty collection.

Syntax

SelectedItems

Remarks

When the MultiSelect property is set to true, this property returns a collection containing the items that are selected in the control. For a single-selection control, this property returns a collection containing the only selected item. For more information on the tasks that can be performed with the items in the collection, see SelectedItems collection.

See Also

Applies To: ListView


SelectedNode Property

Description

Gets or sets the tree node that is currently selected in the tree view control.

Syntax

object.SelectedNode [ = TreeNode ]

Property Value

The TreeNode that is currently selected in the tree view control.

Remarks

If no TreeNode is currently selected, the SelectedNode property returns an Empty reference.

See Also

Applies To: TreeView


SelectedPath Property

Description

Gets or sets the path selected by the user.

Syntax

$Object.SelectedPath [ = String ]

Values

The path of the folder first selected in the dialog box or the last folder selected by the user. The default is an empty string ("").

Remarks

If the SelectedPath property is set before showing the dialog box, the folder with this path will be the selected folder, as long as SelectedPath is set to an absolute path that is a subfolder of RootFolder (or more accurately, points to a subfolder of the shell namespace represented by RootFolder).

If ShowDialog returns OK, meaning the user clicked the OK button, the SelectedPath property will return a string containing the path to the selected folder. If ShowDialog returns Cancel, meaning the user canceled out of the dialog box, this property will have the same value that it had prior to displaying the dialog box. If the user selects a folder that does not have a physical path (for example, My Computer), the OK button on the dialog box will be disabled.


SelectedTab Property

Description

Gets the currently-selected tab page.

Syntax

SelectedTab

Property Value

A TabPage that represents the selected tab page. If no tab page is selected, the value is a empty reference.

See Also

Applies To: TabControl


SelectedText Property

Description

Gets or sets the currently selected text in the control.

Syntax

SelectedText [ = String ]

Property Value

A string that represents the currently selected text in the control.

Remarks

You can assign text to this property to change the text currently selected in the text box. If no text is currently selected in the text box, this property returns a zero-length string.

See Also

Applies To: ComboBox | TextBox


SelectionLength Property

Description

Gets or sets the number of characters selected in the control.

Syntax

SelectionLength [ = Long ]

Property Value

The number of characters selected.

Remarks

You can use this property to determine if any characters are currently selected in the text box control before performing operations on the selected text. When the value of the SelectionLength property is set to a value that is larger than the number of characters within the text of the control, the value of the SelectionLength property is set to the entire length of text within the control minus the value of the SelectionStart property (if any value is specified for the SelectionStart property).

Note You can programmatically move the caret within the text box by setting the SelectionStart to the position within the text box where you want the caret to move to and set the SelectionLength property to a value of zero (0). The text box must have focus in order for the caret to be moved.

See Also

Applies To: ComboBox | TextBox


SelectionStart Property

Description

Gets or sets the starting point of text selected in the control.

Syntax

SelectionStart [ = Long ]

Property Value

The starting point of text selected in the object.

Remarks

If no text is selected in the control, this property indicates the insertion point for new text. If you set this property to a location beyond the length of the text in the control, the selection start position will be placed after the last character. When text is selected in the text box control, changing this property might decrease the value of the SelectionLength property. If the remaining text in the control after the position indicated by the SelectionStart property is less than the value of the SelectionLength property, the value of the SelectionLength property is automatically decreased. The value of the SelectionStart property never causes an increase in the SelectionLength property.

Note You can programmatically move the caret within the text box by setting the SelectionStart to the position within the text box where you want the caret to move to and set the SelectionLength property to a value of zero (0). The text box must have focus in order for the caret to be moved.

See Also

Applies To: ComboBox | TextBox


Sender Property

Description

Gets the object that raised the event.

Syntax

object.Sender

Property Value

The object that raised the event.

See Also

Applies To: System


Shortcut Property (MenuItem Object)

Description

Gets or sets a string value indicating the shortcut key associated with the menu item.

Syntax

object.Shortcut [ = String ]

Property Value

One of the following string values:

Setting (String) | Description
Alt0 | The shortcut keys ALT+0.
Alt1 | The shortcut keys ALT+1.
Alt2 | The shortcut keys ALT+2.
Alt3 | The shortcut keys ALT+3.
Alt4 | The shortcut keys ALT+4.
Alt5 | The shortcut keys ALT+5.
Alt6 | The shortcut keys ALT+6.
Alt7 | The shortcut keys ALT+7.
Alt8 | The shortcut keys ALT+8.
Alt9 | The shortcut keys ALT+9.
AltBksp | The shortcut keys ALT+BACKSPACE.
AltF1 | The shortcut keys ALT+F1.
AltF10 | The shortcut keys ALT+F10.
AltF11 | The shortcut keys ALT+F11.
AltF12 | The shortcut keys ALT+F12.
AltF2 | The shortcut keys ALT+F2.
AltF3 | The shortcut keys ALT+F3.
AltF4 | The shortcut keys ALT+F4.
AltF5 | The shortcut keys ALT+F5.
AltF6 | The shortcut keys ALT+F6.
AltF7 | The shortcut keys ALT+F7.
AltF8 | The shortcut keys ALT+F8.
AltF9 | The shortcut keys ALT+F9.
Ctrl0 | The shortcut keys CTRL+0.
Ctrl1 | The shortcut keys CTRL+1.
Ctrl2 | The shortcut keys CTRL+2.
Ctrl3 | The shortcut keys CTRL+3.
Ctrl4 | The shortcut keys CTRL+4.
Ctrl5 | The shortcut keys CTRL+5.
Ctrl6 | The shortcut keys CTRL+6.
Ctrl7 | The shortcut keys CTRL+7.
Ctrl8 | The shortcut keys CTRL+8.
Ctrl9 | The shortcut keys CTRL+9.
CtrlA | The shortcut keys CTRL+A.
CtrlB | The shortcut keys CTRL+B.
CtrlC | The shortcut keys CTRL+C.
CtrlD | The shortcut keys CTRL+D.
CtrlDel | The shortcut keys CTRL+DELETE.
CtrlE | The shortcut keys CTRL+E.
CtrlF | The shortcut keys CTRL+F.
CtrlF1 | The shortcut keys CTRL+F1.
CtrlF10 | The shortcut keys CTRL+F10.
CtrlF11 | The shortcut keys CTRL+F11.
CtrlF12 | The shortcut keys CTRL+F12.
CtrlF2 | The shortcut keys CTRL+F2.
CtrlF3 | The shortcut keys CTRL+F3.
CtrlF4 | The shortcut keys CTRL+F4.
CtrlF5 | The shortcut keys CTRL+F5.
CtrlF6 | The shortcut keys CTRL+F6.
CtrlF7 | The shortcut keys CTRL+F7.
CtrlF8 | The shortcut keys CTRL+F8.
CtrlF9 | The shortcut keys CTRL+F9.
CtrlG | The shortcut keys CTRL+G.
CtrlH | The shortcut keys CTRL+H.
CtrlI | The shortcut keys CTRL+I.
CtrlIns | The shortcut keys CTRL+INSERT.
CtrlJ | The shortcut keys CTRL+J.
CtrlK | The shortcut keys CTRL+K.
CtrlL | The shortcut keys CTRL+L.
CtrlM | The shortcut keys CTRL+M.
CtrlN | The shortcut keys CTRL+N.
CtrlO | The shortcut keys CTRL+O.
CtrlP | The shortcut keys CTRL+P.
CtrlQ | The shortcut keys CTRL+Q.
CtrlR | The shortcut keys CTRL+R.
CtrlS | The shortcut keys CTRL+S.
CtrlShift0 | The shortcut keys CTRL+SHIFT+0.
CtrlShift1 | The shortcut keys CTRL+SHIFT+1.
CtrlShift2 | The shortcut keys CTRL+SHIFT+2.
CtrlShift3 | The shortcut keys CTRL+SHIFT+3.
CtrlShift4 | The shortcut keys CTRL+SHIFT+4.
CtrlShift5 | The shortcut keys CTRL+SHIFT+5.
CtrlShift6 | The shortcut keys CTRL+SHIFT+6.
CtrlShift7 | The shortcut keys CTRL+SHIFT+7.
CtrlShift8 | The shortcut keys CTRL+SHIFT+8.
CtrlShift9 | The shortcut keys CTRL+SHIFT+9.
CtrlShiftA | The shortcut keys CTRL+SHIFT+A.
CtrlShiftB | The shortcut keys CTRL+SHIFT+B.
CtrlShiftC | The shortcut keys CTRL+SHIFT+C.
CtrlShiftD | The shortcut keys CTRL+SHIFT+D.
CtrlShiftE | The shortcut keys CTRL+SHIFT+E.
CtrlShiftF | The shortcut keys CTRL+SHIFT+F.
CtrlShiftF1 | The shortcut keys CTRL+SHIFT+F1.
CtrlShiftF10 | The shortcut keys CTRL+SHIFT+F10.
CtrlShiftF11 | The shortcut keys CTRL+SHIFT+F11.
CtrlShiftF12 | The shortcut keys CTRL+SHIFT+F12.
CtrlShiftF2 | The shortcut keys CTRL+SHIFT+F2.
CtrlShiftF3 | The shortcut keys CTRL+SHIFT+F3.
CtrlShiftF4 | The shortcut keys CTRL+SHIFT+F4.
CtrlShiftF5 | The shortcut keys CTRL+SHIFT+F5.
CtrlShiftF6 | The shortcut keys CTRL+SHIFT+F6.
CtrlShiftF7 | The shortcut keys CTRL+SHIFT+F7.
CtrlShiftF8 | The shortcut keys CTRL+SHIFT+F8.
CtrlShiftF9 | The shortcut keys CTRL+SHIFT+F9.
CtrlShiftG | The shortcut keys CTRL+SHIFT+G.
CtrlShiftH | The shortcut keys CTRL+SHIFT+H.
CtrlShiftI | The shortcut keys CTRL+SHIFT+I.
CtrlShiftJ | The shortcut keys CTRL+SHIFT+J.
CtrlShiftK | The shortcut keys CTRL+SHIFT+K.
CtrlShiftL | The shortcut keys CTRL+SHIFT+L.
CtrlShiftM | The shortcut keys CTRL+SHIFT+M.
CtrlShiftN | The shortcut keys CTRL+SHIFT+N.
CtrlShiftO | The shortcut keys CTRL+SHIFT+O.
CtrlShiftP | The shortcut keys CTRL+SHIFT+P.
CtrlShiftQ | The shortcut keys CTRL+SHIFT+Q.
CtrlShiftR | The shortcut keys CTRL+SHIFT+R.
CtrlShiftS | The shortcut keys CTRL+SHIFT+S.
CtrlShiftT | The shortcut keys CTRL+SHIFT+T.
CtrlShiftU | The shortcut keys CTRL+SHIFT+U.
CtrlShiftV | The shortcut keys CTRL+SHIFT+V.
CtrlShiftW | The shortcut keys CTRL+SHIFT+W.
CtrlShiftX | The shortcut keys CTRL+SHIFT+X.
CtrlShiftY | The shortcut keys CTRL+SHIFT+Y.
CtrlShiftZ | The shortcut keys CTRL+SHIFT+Z.
CtrlT | The shortcut keys CTRL+T.
CtrlU | The shortcut keys CTRL+U
CtrlV | The shortcut keys CTRL+V.
CtrlW | The shortcut keys CTRL+W.
CtrlX | The shortcut keys CTRL+X.
CtrlY | The shortcut keys CTRL+Y.
CtrlZ | The shortcut keys CTRL+Z.
Del | The shortcut key DELETE.
F1 | The shortcut key F1.
F10 | The shortcut key F10.
F11 | The shortcut key F11.
F12 | The shortcut key F12.
F2 | The shortcut key F2.
F3 | The shortcut key F3.
F4 | The shortcut key F4.
F5 | The shortcut key F5.
F6 | The shortcut key F6.
F7 | The shortcut key F7.
F8 | The shortcut key F8.
F9 | The shortcut key F9.
Ins | The shortcut key INSERT.
None | No shortcut key is associated with the menu item.
ShiftDel | The shortcut keys SHIFT+DELETE.
ShiftF1 | The shortcut keys SHIFT+F1.
ShiftF10 | The shortcut keys SHIFT+F10.
ShiftF11 | The shortcut keys SHIFT+F11.
ShiftF12 | The shortcut keys SHIFT+F12.
ShiftF2 | The shortcut keys SHIFT+F2.
ShiftF3 | The shortcut keys SHIFT+F3.
ShiftF4 | The shortcut keys SHIFT+F4.
ShiftF5 | The shortcut keys SHIFT+F5.
ShiftF6 | The shortcut keys SHIFT+F6.
ShiftF7 | The shortcut keys SHIFT+F7.
ShiftF8 | The shortcut keys SHIFT+F8.
ShiftF9 | The shortcut keys SHIFT+F9.
ShiftIns | The shortcut keys SHIFT+INSERT.

Example

$NewMenu.Shortcut = "CtrlN"

See Also

Applies To: MenuItem


ShortcutText Property (Menuitem Object)

Description

Gets or sets the shortcut text associated with the menu item.

Syntax

object.ShortcutText [ = String ]

Property Value

A string specifying the shortcut text.

Remarks

By default, the shortcut text displayed by the menu item is taken from the Shortcut property. Use this property to change or override this default value.

Example

$OpenMenu.ShortcutText = "Control+O"

See Also

Applies To: MenuItem


ShowInTaskBar Property

Description

Gets or sets a value indicating whether an form is displayed in the Windows taskbar.

Syntax

form.ShowInTaskBar [ = Boolean ]

Property Value

True to display the owned form in the Windows taskbar at run time; otherwise, false. The default is true.

Remarks

Only an owned form or a form with certain border styles can be hidden in the taskbar. An application creates an owned form by specifying the owner's form handle as the ownerForm parameter in the Form method when it creates a form. To create the appearance of a top-level form that is hidden in the taskbar, first create a hidden top-level form then create a secondary form owned by the hidden form, example:

$System = CreateObject("Kixtart.System")

$Root = $System.Form()

$Form = $System.Form($Root)

$Form.ShowInTaskBar = "False"

A top-level form that has it's FormBorderStyle property set to FixedToolWindow or SizableToolWindow can also be hidden from the taskbar.

See Also

Applies To: Form


ShowLines Property

Description

Gets or sets a value indicating whether lines are drawn between tree nodes in the tree view control.

Syntax

object.ShowLines [ = Boolean ]

Property Value

True if lines are drawn between tree nodes in the tree view control; otherwise, false. The default is true.

Remarks

If ShowLines is set to true, the FullRowSelect property is ignored.

See Also

Applies To: TreeView


ShowNewFolderButton Property

Note

This property is not functioning properly in the current release. Although it is enabled by default on NT5, the suggestion is to disabled until further notice.

Description

Gets or sets a value indicating whether the New Folder button appears in the folder browser dialog box.

Syntax

ShowNewFolderButton [ = Boolean ]

Property Value

True if the New Folder button is shown in the dialog box; otherwise, false. The default is true.

Remarks

When ShowNewFolderButton is true, the New Folder button is visible, giving the user a chance to create a folder. When the user clicks the New Folder button, a new folder is created and the user is prompted to specify the folder name. The selected node in the tree becomes the parent of the new folder.

Note: The actual caption of the New Folder button can vary depending upon the operation system.


ShowPlusMinus Property

Description

Gets or sets a value indicating whether plus-sign (+) and minus-sign (-) buttons are displayed next to tree nodes that contain child tree nodes.

Syntax

object.ShowPlusMinus [ = Boolean ]

Property Value

True if plus-sign and minus-sign buttons are displayed next to tree nodes that contain child tree nodes; otherwise, false. The default is true.

Remarks

The plus-sign and minus-sign buttons appear next to the root tree nodes only if the ShowRootLines property is true. If the plus-sign and minus-sign buttons are not displayed, no visual cue exists to indicate that the tree node contains child tree nodes and is expandable. The user then must double-click a tree node to determine whether it contains child tree nodes, to expand it, or to collapse it.

See Also

Applies To: TreeView


ShowReadOnly Property

Description

Gets or sets a value indicating whether the dialog contains a read-only check box.

Syntax

ShowReadOnly [ = Boolean ]

Property Value

True if the dialog contains a read-only check box; otherwise, false. The default value is false.

See Also

Applies To: OpenFileDialog


ShowRootLines Property

Description

Gets or sets a value indicating whether lines are drawn between the tree nodes that are at the root of the tree view.

Syntax

object.ShowRootLines [ = Boolean ]

Property Value

True if lines are drawn between the tree nodes that are at the root of the tree view; otherwise, false. The default is true.

Remarks

If the ShowRootLines property is false, the plus-sign and minus-sign buttons will not appear next to the root tree nodes, and the ShowPlusMinus property will have no effect.

See Also

Applies To: TreeView


Size Property

Description

Gets or sets the height and width of the object.

Syntax

object.Size [ = size ]

object.Size = width, height

Property Value

size - a Size object that represents the height and width of the control in pixels.

width, height - an array of two numbers specifying the width and height of the control, in pixels.

Example

$Form.Size = 640, 480
$Form.Size = $System.Size(640, 480)


Size Property (Font Object)

Description

Gets or sets the point size of this Font object.

Syntax

Size [ = Double ]

Property Value

The point size of this Font object.

Example

$Font.Size = 8.25

See Also

Applies To: Font


SizeGripStyle Property (Form Object)

Description

Gets or sets the style of the size grip to display in the lower-right corner of the form.

Syntax

object.SizeGripStyle [ = Long ]

Property Value

One of the following values:

Long | Description
0 | The sizing grip is automatically displayed when needed. This setting is still under development.
1 | The sizing grip is always shown on the form.
2 | The sizing grip is hidden.

Example

$Form.SizeGripStyle = 1

See Also

Applies To: Form


SizeMode Property

Description

Gets or sets the way that the control's tabs are sized.

Syntax

object.SizeMode [ = Value ]

Property Value

One of the following values. The default is Normal.

Value | Name | Description
0 | Normal | The width of each tab is sized to accommodate what is displayed on the tab, and the size of tabs in a row are not adjusted to fill the entire width of the container control.
1 | FillToRight | The width of each tab is sized so that each row of tabs fills the entire width of the container control. This is only applicable to tab controls with more than one row.
2 | Fixed | All tabs in a control are the same width.

See Also

Applies To: TabControl


SizeMode Property (PictureBox Control)

Description

Indicates how the image is displayed.

Syntax

object.SizeMode [ = Value ]

Property Value

One of the following values. The default is 0.

Value | Description
0 | The image is placed in the upper-left corner of the PictureBox. The image is clipped if it is larger than the PictureBox it is contained in.
1 | The image within the PictureBox is stretched or shrunk to fit the size of the PictureBox.

See Also

Applies To: PictureBox


SizingGrip Property (StatusBar Object)

Description

Gets or sets a value indicating whether a sizing grip is displayed in the lower-right corner of the status bar.

Syntax

object.SizingGrip [ = Boolean ]

Property Value

True if a sizing grip is displayed; otherwise, false. The default is true.

See Also:

Applies To: StatusBar


SmallChange Property

Description

Gets or sets the value added to or subtracted from the Value property when the slider is moved a small distance.

Syntax

object.SmallChange [ = Long ]

Property Value

A numeric value. The default value is 1.

Remarks

When the user presses one of the arrow keys, the Value property changes according to the value set in the SmallChange property.

You might consider setting the SmallChange value to a percentage of the Height (for a vertically oriented scroll bar) or Width (for a horizontally oriented scroll bar) values. This keeps the distance your scroll bar moves in proportion to its size.

See Also

Applies To: ScrollBar


SmallImageList Property

Description

Gets or sets the ImageList to use when displaying items as small icons.

Syntax

SmallImageList [ = ImageList ]

Property Value

The ImageList object that contains the icons to use when the View property is set to SmallIcon. The default is an empty reference.

See Also

Applies To: ListView


Sorted Property

Description

Gets or sets a value indicating whether the items in the control are sorted alphabetically.

Syntax

object.Sorted [ = Boolean ]

Property Value

True if items in the control are sorted; otherwise, false. The default is false.


Sorting Property

Description

Gets or sets the sort order for items in the control.

Syntax

object.Sorting [ = Long ]

object.Sorting = "String"

Property Value

One of the following values:

Long | String | Description
0 | None | The items are not sorted.
1 | Ascending | The items are sorted in ascending order.
2 | Descending | The items are sorted in descending order.

See Also

Applies To: ListView


SplitterDistance Property

Description

Gets or sets the location of the splitter, in pixels, from the left or top edge of the SplitContainer.

Syntax

object.SplitterDistance [ = Long ]

Property Value

An numeric value representing the location of the splitter, in pixels, from the left or top edge of the SplitContainer.

See Also:

Applies To: SplitContainer


StartPosition Property (Form Object)

Description

Gets or sets the starting position of the form.

Syntax

object.StartPosition [ = Long ]

Property Value

One of the following values:

Setting | Long | Description
Manual | 0 | The position of the form is determined by the Location property.
CenterScreen | 1 | The form is centered on the current display, and has the dimensions specified in the form's size.
WindowsDefaultBounds | 3 | The form is positioned at the Windows default location and has the bounds determined by Windows default.
WindowsDefaultLocation | 2 | The form is positioned at the Windows default location and has the dimensions specified in the form's size.
CenterParent | 4 | The form is centered within the bounds of its parent form.

Remarks

This property enables you to set the starting position of the form when it is displayed at run time. The form can be displayed manually or in the default location specified by Windows. You can also position the form to display in the center of the screen or in the center of its parent form.


StrikeOut Property

Description

Gets a value that indicates whether this Font object specifies a horizontal line through the font.

Syntax

StrikeOut [ = Boolean ]

Property Value

True if this Font object has a horizontal line through it; otherwise, false.

Example

$Font.StrikeOut = 0

See Also

Applies To: Font


Step Property

Description

Gets or sets the amount by which a call to the PerformStep method increases the current position of the ProgressBar.

Syntax

Step [ = Long ]

Property Value

The amount by which to increment the progress bar with each call to the PerformStep method. The default is 10.

Remarks

You can use the Step property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you may want to set the value of the Step property to 1 and the value of the Maximum property to the total number of files to copy. When each file is copied, you can call the PerformStep method to increment the progress bar by the value of the Step property. If you want to have more flexible control of the value of the progress bar, you can use the Increment method or set the value of the Value property directly.


Style Property (Font Object)

Description

Gets or sets style information for this Font object.

Syntax

object.Style [ = Value ]

Property Value

A bitwise combination of following values:

Example

$Font.Style = $System.FontStyle.Bold + $System.FontStyle.Underline

See Also

Applies To: Font


Style Property (ProgressBar Control)

Description

Gets or sets the style of the ProgressBar.

Syntax

object.Style [ = Value ]

Property Value

One of the following values.

Value | Name | Description
0 | Normal | The progress bar displays a normal (segmented) bar.
1 | Smooth | The progress bar displays a smooth scrolling bar.


Style Property (MainMenu Object)

Description

Gets or sets the style of the MainMenu.

Syntax

object.Style [ = Long ]

Property Value

One of the following values:

Value | Description
0 | Classic
1 | Office 2000

Example

$Form.Menu = $System.MainMenu()
$Form.Menu.Style = 1


Style Property (ToolButton Control)

Description

Gets or sets the style of the ToolButton.

Syntax

object.Style [ = Value ]

Property Value

One of the following values:

Value | Name | Description
0 | PushButton | A standard, three-dimensional button.
1 | ToggleButton | A toggle button that appears sunken when clicked and retains the sunken appearance until clicked again.
Remarks

The ToggleButton style causes the tool button to act like a toggle button; it can be in an on or off state. Use the Pushed property to determine the state.


SubItems Property

Description

Returns a SubItems collection that represents all the subitems in the specified item.

Syntax

SubItems

Remarks

Use SubItems(index), where index is the subitem index number, to return a single SubItem object from the collection.


TabPages Property

Description

Returns a TabPages collection that represents all the tab pages in the specified control.

Syntax

TabPages

Remarks

Use TabPages(index), where index is the tab page index number, to return a single TabPage object from the collection.


TabStop Property

Description

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

Syntax

TabStop [ = Boolean ]

Property Value

True if the user can give the focus to the control using the TAB key; otherwise, false. The default is true.


object.Tag Property

Summary:

Gets or sets a variant that contains user-defined data about the object.

Syntax:

object.Tag [ = variant ]

Property Values:

A variant that contains data about the object.


Text Property

Description

Gets or sets the text associated with the object.

Syntax

object.Text [ = String ]

Property Value

The text associated with the object.

Remarks

The Text property is used differently by each derived class. For example the Text property of a Form is displayed in the title bar at the top of the form, is fairly small in character count, and usually displays the application or document name. However, the Text property of a TextBox can be large and can include numerous nonvisual characters used to format the text. For example, the text displayed in a TextBox can be formatted by adjusting the Font property, or by the addition of spaces or tab characters to align the text.


ListItem.Text Property

Summary:

Gets or sets the text displayed in a list control for the item represented by the ListItem.

Syntax:

object.Text [ = string ]

Property Values:

The text displayed in a list control for the item represented by the ListItem. The default value is empty.

See Also:

Applies To: ListItem


Text Property (MaskedTextBox Object)

Description

Gets or sets the text as it is currently displayed to the user.

Syntax

object.Text [ = "String" ]

Property Value

A string containing the text currently displayed by the control. The default is an empty string.

Remarks

Strings retrieved using this property are formatted according to the control's formatting properties, such as Mask. Literals and prompt characters are included in the string.

You must assign a string without literal characters to Text. This behavior may change in a future release.

See Also:

Applies To: MaskedTextBox


TextAlign Property

Description

Gets or sets the alignment of text on the object.

Syntax

object.TextAlign [ = Value ]

object.TextAlign = "Name"

Property Value

One of the following values.

Value | Name | Description
1 | TopLeft | Text is vertically aligned at the top, and horizontally aligned on the left.
2 | TopCenter | Text is vertically aligned at the top, and horizontally aligned at the center.
4 | TopRight | Text is vertically aligned at the top, and horizontally aligned on the right.
16 | MiddleLeft | Text is vertically aligned in the middle, and horizontally aligned on the left.
32 | MiddleCenter | Text is vertically aligned in the middle, and horizontally aligned at the center.
64 | MiddleRight | Text is vertically aligned in the middle, and horizontally aligned on the right.
256 | BottomLeft | Text is vertically aligned at the bottom, and horizontally aligned on the left.
512 | BottomCenter | Text is vertically aligned at the bottom, and horizontally aligned at the center.
1024 | BottomRight | Text is vertically aligned at the bottom, and horizontally aligned on the right.

See Also

Applies To: Button | Label


TextAlign Property (Column Object)

Description

Gets or sets the horizontal alignment of the text displayed in the column header.

Syntax

object.TextAlign [ = Value ]

object.TextAlign = "Name"

Property Value

One of the following values.

Value | Name | Description
0 | Left | The text is aligned on the left of the column header.
1 | Right | The text is aligned on the right of the column header.
2 | Center | The text is aligned in the center of the column header.


TextAlign Property (GroupBox Control)

Description

Gets or sets the alignment of text on the group box.

Syntax

object.TextAlign [ = Value ]

object.TextAlign = "Name"

Property Value

One of the following values.

Value | Name | Description
1 | TopLeft | Text is vertically aligned at the top, and horizontally aligned on the left.
2 | TopCenter | Text is vertically aligned at the top, and horizontally aligned at the center.
4 | TopRight | Text is vertically aligned at the top, and horizontally aligned on the right.


TextAlign Property (TextBox Control)

Description

Gets or sets how text is aligned in a text box control.

Syntax

object.TextAlign [ = Value ]

Property Value

One of the following values. The default is Left.

Value | Name | Description
0 | Left | The object or text is aligned on the left of the control element.
1 | Right | The object or text is aligned on the right of the control element.
2 | Center | The object or text is aligned in the center of the control element.


ThreeState Property

Description

Gets or sets a value indicating whether the CheckBox will allow three check states rather than two.

Syntax

ThreeState [ = Boolean ]

Property Value

True if the CheckBox is able to display three check states; otherwise, false. The default value is false.


TickStyle Property

Description

Gets or sets a value indicating how to display the tick marks on the control.

Syntax

object.TickStyle [ = Value ]

Property Value

One of the following values:

Value | Name | Description
0 | None | No tick marks appear in the control.
1 | TopLeft | Tick marks are located on the top of a horizontal control or on the left of a vertical control.
2 | BottomRight | Tick marks are located on the bottom of a horizontal control or on the right side of a vertical control.
3 | Both | Tick marks are located on both sides of the control.

Remarks

You can use the TickStyle property to modify the manner in which the tick marks are displayed on the track bar.


Title Property

Description

Gets or sets the dialog box title.

Syntax

Title [ = String ]

Property Value

A string containing the dialog box title. The default value depends on the derived class.

Remarks

The string is placed in the title bar of the dialog box. If the title is an empty string, the system uses a default title, which is either "Save As" or "Open".


ToolTipText Property

Description

Sets the text that appears as a tooltip for the control.

Syntax

ToolTipText [ = String ]

Property Value

A string value specifying the text that appears as a tooltip for the control. Use CHR(10) or CHR(13) to create a multi-line tooltip.

Example

$Button1.ToolTipText = "Click here for more information"

$Button1.ToolTipText = "This is line one."+CHR(13)+"This is line two."


Top Property

Description

Gets or sets the y-coordinate of the object's top edge.

Syntax

Top [ = Long ]

Property Value

The y-coordinate of the control's top edge, in pixels.

Example

$Form.Top = 100

Remarks

To override the default location of a Form when it displays for the first time, set the StartPosition property of the form to FormStartPosition.Manual. For example:

$Form.Left = 10
$Form.Top = 10
$Form.StartPosition = $System.FormStartPosition.Manual


TopMost Property

Description

Gets or sets a value indicating whether the Form should be displayed as the top-most form of your application.

Syntax

TopMost [ = Boolean ]

Property Value

True to display the form as a top-most form; otherwise, false. The default is false.

Remarks

A top-most form is a form that overlaps all the other forms even if it is not the active or foreground form. Top-most forms are always displayed at the highest point in the Z-order of an application. You can use this method to create a form that is always displayed in your application, such as a Find and Replace tool window.

See Also

Applies To: Form Object


TransparentColor Property

Description

Gets or sets the color to treat as transparent.

Syntax

TransparentColor [ = Long ]

TransparentColor = Long, Long, Long

TransparentColor = String

Property Value

One of the Color values.

Remarks

The transparent color is not rendered when the image is drawn.


Underline Property

Description

Gets or sets a value that indicates whether this Font object is underlined.

Syntax

Underline [ = Boolean ]

Property Value

True if this Font object is underlined; otherwise, false.

Example

$Font.Underline = -1

See Also

Applies To: Font Object


Value Property (HyperLink Control)

Description

Gets or sets the URL to invoke when the HyperLink is clicked.

Syntax

Value [ = String ]

Property Value

A string expression specifying the URL to invoke when the hyperlink is clicked.

See Also

Applies To: HyperLink


ListItem.Value Property

Summary:

Gets or sets the value associated with the ListItem.

Syntax:

object.Value [ = string ]

Property Values:

The value associated with the ListItem. The default is empty.

See Also:

Applies To: ListItem


Value Property (ProgressBar Control)

Description

Gets or sets the current position of the progress bar.

Syntax

Value [ = Long ]

Property Value

The current position of the progress bar.

Remarks

The minimum and maximum values of the Value property are specified by the Minimum and Maximum properties. This property enables you to increment or decrement the value of the progress bar directly. To perform consistent increases in the value of the ProgressBar control you can use the Step property with the PerformStep method. To increase the progress bar value by varying amounts, use the Increment method.

See Also

Applies To: ProgressBar


Value Property (TrackBar Control)

Description

Gets or sets a numeric value that represents the current position of the slider on the track bar control.

Syntax

Value [ = Long ]

Property Value

An integer value that is within the Minimum and Maximum range. The default value is zero.

Remarks

The Value property contains the number that represents the current position of the slider on the track bar.

See Also

Applies To: TrackBar


Version Property

Description

Returns the Kixforms version number.

Syntax

object.Version

Property Value

A string value representing the current Kixforms version number.

Remarks

See Build property for further information.


View Property

Description

Gets or sets how items are displayed in the control.

Syntax

object.View [ = Value ]

object.View = "Name"

Property Value

One of the following values:

Value | Name | Description
0 | LargeIcon | Each item appears as a full-sized icon with a label below it.
1 | Details | Each item appears on a separate line with further information about each item arranged in columns. The left most column contains a small icon and label, and subsequent columns contain sub items as specified by the application. A column displays a header which can display a caption for the column. The user can resize each column at runtime.
2 | SmallIcon | Each item appears as a small icon with a label to its right.
3 | List | Each item appears as a small icon with a label to its right. Items are arranged in columns with no column headers.

See Also

Applies To: ListView


Visible Property

Summary:

Gets or sets a value indicating whether the object is visible.

Syntax:

object.Visible [ = boolean ]

Property Values:

True if the object is visible; otherwise, false. For forms and notify icons, the default is false. For all other objects, the default is true.

Remarks:

MenuItem: You can use this property to modify a menu structure without having to merge menus or disable menus. For example, if you want to hide a complete section of functionality from the menus for your application, you can hide them from the user by setting this property to false.


Width Property

Description

Gets or sets the width of the object.

Syntax

object.Width [ = Long ]

Property Value

The width of the object, in pixels.

Remarks:

Some objects (like forms) have minimum and maximum values for width. For example - a form cannot be re-sized to less than the minimum width of a window title bar.

Bitmap/Icon: This property is read-only.


WindowState Property

Description

Gets or sets the window state of the form.

Syntax

object.WindowState [ = Value ]

Property Value

One of the following values. The default is Normal.

Value | Name | Description
0 | Normal | A default sized window
1 | Minimized | A minimized window
2 | Maximized | A maximized window

See Also

Applies To: Form Object


WordWrap Property

Description

Gets or sets whether a Multiline control automatically wraps words to the beginning of the next line when necessary.

Syntax

WordWrap [ = Boolean ]

Property Value

True if the Multiline control wraps words; false if the control automatically scrolls horizontally when the user types past the right edge of the control. The default is true.

Remarks

If this property is set to true, horizontal scroll bars are not displayed regardless of the ScrollBars property setting.


WorkingArea Property

Description

Gets the working area bounds of the display.

Syntax

WorkingArea

Property Value

Rectangle - a Rectangle specifying the working area location and size of the display.

Example

$Form.Bottom = $System.Screen.WorkingArea.Bottom

See Also

Applies To: Screen


X Property (EventArgs Object)

Description

Gets the x-coordinate of a mouse click.

Syntax

object.X

Property Value

The x-coordinate of a mouse click in pixels.

Remarks

The mouse click coordinates are based on the client area of the form.

See Also

Applies To: EventArgs


Y Property (EventArgs Object)

Description

Gets the y-coordinate of a mouse click.

Syntax

object.Y

Property Value

The y-coordinate of a mouse click in pixels.

Remarks

The mouse click coordinates are based on the client area of the form.

See Also

Applies To: EventArgs


X Property (Point Object)

Description

Gets or sets the x-coordinate of this Point.

Syntax

X [ = Long ]

Property Value

The x-coordinate of this Point.

See Also

Applies To: Point Object


Y Property

Description

Gets or sets the y-coordinate of this Point.

Syntax

Y [ = Long ]

Property Value

The y-coordinate of this Point.

See Also

Applies To: Point Object


Activate Method

Description

Activates the form and gives it focus.

Syntax

Activate()

Remarks

Activating a form brings it to the front if this is the active application, or it flashes the window caption if this is not the active application. The form must be visible for this method to have any effect. To determine the active form in an application, use the ActiveForm property.

See Also

Applies To: Form


Add Method (Collection Object)

Summary:

Adds a member to the collection.

Syntax:

object.Add(item, key)

Parameters:

item:

An object of any type that specifies the member to add to the collection.

key:

An optional (unique) string expression that specifies a key string that can be used instead of a positional index to access a member of the collection.


Add Method (Columns Collection)

Description

Adds a column header to the collection with specified text, width, and alignment settings.

Syntax

object.Add(text, width, alignment)

Parameters

text

An optional string value specifying the text to display in the column header.

width

An optional numeric value specifying the initial width of the column header. Use -2 to autosize the column header to the size of the text in the heading.

alignment

An optional numeric value specifying the horizontal alignment of the text in the column header. Can be one of the following values. The default is Left.

Setting | Value | Description
Left | 0 | The object or text is aligned on the left of the control element.
Right | 1 | The object or text is aligned on the right of the control element.
Center | 2 | The object or text is aligned in the center of the control element.

Return Value

The Column that was created and added to the collection.

See Also

Applies To: Columns


Add Method (ControlCollection Object)

Description

Adds a control to the collection and returns a reference to the control.

Syntax:

object.Add(type)

Parameters

type
Required. A string that identifies the type of control to add. Can be one of the following values:
Type | Description
"Button" | The Button control
"CheckBox" | The CheckBox control.
"ComboBox" | The CheckBox control.
"GroupBox" | The GroupBox control.
"HyperLink" | The HyperLink control.
"Label" | The Label control.
"ListBox" | The ListBox control.
"ListView" | The ListView control.
"Panel" | The Panel control.
"PictureBox" | The PictureBox control.
"ProgressBar" | The ProgressBar control.
"RadioButton" | The RadioButton control.
"RichTextBox" | The RichTextBox control.
"SplitContainer" | The SplitContainer control.
"Splitter" | The Splitter control.
"StatusBar" | The StatusBar control.
"TabControl" | The TabControl control.
"TextBox" | The TextBox control.
"ToolButton" | The ToolButton control.
"TrackBar" | The TrackBar control.
"TreeView" | The TreeView control.

Example

$Button1 = $Form.Controls.Add("Button")

Applies To

ControlCollection


Add Method (Images Collection)

Description

Adds the specified image to the collection, using the specified color to generate the mask.

Syntax

object.Add( filename, color )

Parameters

filename - a required string expression specifying the fully qualified filename of the image to be added into the collection.

color - an optional variant expression specifying one of the Color values.

Return Value

The index of the newly added image or -1 if the the image could not be added.

See Also

Applies To: Images


Add Method (Items Collection)

Summary:

Adds an item to the collection with the specified text and image.

Syntax:

object.Add(text, imageIndex)

Parameters:

text:

An optional string value specifying the text of the item.

imageIndex:

An optional numeric value specifying the index of the image to display for the item.

Return Values:

The Item that was added to the collection.

See Also

Applies To: Items


ListItemCollection.Add Method

Summary:

Appends a ListItem to the end of the collection that represents the specified text.

Syntax:

object.Add(text)

Parameters:

text:

A string that represents the item to add to the end of the collection.

Return Values:

The ListItem that was added to the collection.

See Also:

Applies To: ListItemCollection


Add Method (MenuItemCollection Object)

Description

Creates a new menu item and adds it to the menu.

Syntax

Add( Text, OnClick, Reserved, Seperator )

Parameters

Text - An optional string value specifying the caption of the menu item.

OnClick - An optional string value specifying the event handler that is called when the menu item is clicked by the user.

Reserved - Reserved for future use. Use a null value or "".

Seperator - An optional string value specifying whether a menu seperator is placed before the menu item. Use "-" to specify that a seperator is to be placed before the menu item.

Return Value

A MenuItem that represents the menu item being added to the collection.

See Also

Applies To: MenuItemCollection


Add Method (TabPages Collection)

Description

Adds a tab page to the collection.

Syntax

Add( Text, ImageIndex )

Parameters

Text

An optional string value specifying the text to display in the tab.

ImageIndex

An optional numeric value specifying the index of the image to display in the tab.

Return Value

A TabPage object representing the newly created tab page.

See Also

Applies To: TabPages


Add Method (TreeNodeCollection Object)

Kixforms Class Library

Add Method (TreeNodeCollection Class)

Description

Adds a new tree node to the end of the current tree node collection with the specified label text.

Syntax

object.Add( text, imageIndex, selectedImageIndex )

Parameters

text - The label text displayed by the TreeNode.

imageIndex - The index value of image to display when the tree node is unselected.

selectedImageIndex - The index value of Image to display when the tree node is selected.

Return Value

A TreeNode that represents the tree node being added to the collection.

Remarks

The text parameter value is assigned to the node's Text property and becomes the tree node label. The imageIndex and selectedImageIndex values are the index values of an image stored in the ImageList assigned to the ImageList property. The image referenced in the imageIndex property is displayed when the tree node is not selected. Likewise, the image referenced in the selectedImageIndex property is displayed when the tree node is in a selected state.

See Also

Applies To: TreeNodeCollection


AddItem Method

Description

Adds an item to the list at the specified index.

Syntax

AddItem( Text, Index )

Parameters

Text - an optional string value that evaluates to the text to be added into the list. If this argument is omitted, an empty string ("") is added.

Index - an optional numeric value that specifies the insertion point of the new item. If the list has fewer entries than the specified index, the item is not added. If this argument is omitted, the item is appended to the end of the list.

See Also

Applies To: ComboBox | ListBox


AddStrip Method (Images Collection)

Description

Creates a series of images from a single image and adds them to the collection.

Syntax

object.AddStrip( filename, color, width, height )

Parameters

filename - a string expression that evaluates to the fully qualified path and filename of the image to add into the collection.

color - an optional variant expression that evaluates to the color to treat as transparent. Can be one of the Color values.

width - an optional numeric expression that evaluates to the width of each image in the image strip (as opposed to the default width specified in ImageSize). The resulting image is then fitted to the width specified in ImageSize.

height - an optional numeric expression that evaluates to the height of each image in the image strip (as opposed to the default height specified in ImageSize). The resulting image is then fitted to the height specified in ImageSize.

Remarks

A strip is a single image that is treated as multiple images arranged side-by-side. The number of images to add into the collection is inferred from the width of the given image and the width specified in the method, or as specified in ImageSize.

See Also

Applies To: Images


BeginUpdate Method

Description

Prevents the control from drawing until the EndUpdate method is called.

Syntax

BeingUpdate()

Remarks


Center Method

Summary:

Centers the object inside its container.

Syntax:

object.Center()


Clear Method

Description

Clears all text and items from the control.

Syntax

Clear()


Clear Method (Columns Collection)

Description

Removes all columns from the collection.

Syntax

Clear()

Remarks

When you remove columns from the collection, all information about the deleted columns is lost. To remove a single column from the collection use the Remove method.

See Also

Applies To: Columns


Clear Method (Images Collection)

Description

Removes all the images from the collection.

Syntax

object.Clear()

See Also

Applies To: Images


Clear Method (Items Collection)

Description

Removes all items from the collection.

Syntax

Clear()

Remarks

When you remove items from the collection, all information about the deleted items is lost. To remove a single item from the collection use the Remove method.

See Also

Applies To: Items


ListItemCollection.Clear Method

Summary:

Removes all ListItem objects from the ListItemCollection.

Syntax:

object.Clear()

See Also:

Applies To: ListItemCollection


Clear Method (ListView Control)

Description

Removes all items and columns from the control.

Syntax

object.Clear()

Remarks

You can use this method to remove all items and columns from the ListView control without having to call the individual Clear methods from the Columns and Items classes.

Note: This method (currently) does not free user-defined tags created using the Tag property. This may cause memory leakage if tags are used, otherwise no leakage will occur. This will be fixed in a future release.

See Also

Applies To: ListView


Clear Method (SelectedItems Collection)

Description

Removes all selected items from the collection.

Syntax

Clear()

Remarks

When you remove items from the collection, all information about the deleted items is lost.

See Also

Applies To: SelectedItems


Clear Method (TreeNodeCollection Object)

Description

Removes all tree nodes from the collection.

Syntax

object.Clear()

Remarks

You can use this method to clear the entire collection of tree nodes from a tree view. To remove an individual tree node from the collection, use the Remove method. To add new TreeNode object to the collection, use the Add or Insert methods.

See Also

Applies To: TreeNodeCollection


Copy Method

Description

Copies the current selection in the text box to the Clipboard.

Syntax

Copy()

Remarks

You can use this method to copy text in the text box and place it in the Clipboard.

See Also

Applies To: TextBox


Cos Method

Description

Returns the cosine of the specified angle.

Syntax

Cos( a )

Parameters

a - a numeric expression representing an angle, measured in radians.

Return Value

A double representing the cosine of a.

Remarks

The angle, a, must be in radians. Multiply by p/180 to convert degrees to radians.

See Also

Applies To: Math


Cut Method

Description

Moves the current selection in the text box to the Clipboard.

Syntax

Cut()

Remarks

This method will only cut text from the text box if text is selected in the control. You can use this method to copy text in the text box and move it to the Clipboard.

See Also

Applies To: TextBox


Form.DoEvents Method

Description

Gets the next event from the event queue.

Syntax

object.DoEvents ( async )

Parameters

async - an optional boolean expression indicating whether the method should return immediately if there are no events in the queue. If true, returns immediately. If false, waits for an event to occur before returning control back to your script. The default is false.

Return Value

A string representing the next event in the event queue.

Remarks

The DoEvents method is typically used along with the Execute function to form an event loop, for example:

$Form.Show()
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop>

See Also

Applies To: Form


DoEvents Method (System Object)

Description

Gets the next event in the event queue.

Syntax

object.DoEvents( wait )

Parameters

wait (optional)
A boolean expression indicating whether DoEvents should wait for an event to occur before returning control to your script. If True the method will wait , otherwise it will return immediately. The default is true.

Return Value

A string representing the next event in the queue.

Remarks

DoEvents is typically used along with the Execute function to form an application event loop, for example:

$Form.Show()
While $Form.Visible
 $=Execute($System.DoEvents)
Loop

Note: This method differs from the legacy DoEvents method in that the meaning of wait (async) parameter is reversed.

See Also

Applies To: System


EndUpdate Method

Description

Resumes drawing of the control after drawing is suspended by the BeginUpdate method.

Syntax

EndUpdate()


EnsureVisible Method

Description

Ensures that the specified item is visible within the control, scrolling the contents of the control if necessary.

Syntax

EnsureVisible( Index )

Parameters

Index - a numeric value specifying the zero-based index of the item to scroll into view.

Remarks

You can use this method to ensure that a specific item is visible within the control. When performing validation on the items in a control, you can call the EnsureVisible method to ensure that an item that failed validation is displayed in the control to allow the user to perform changes on the item. If the item that you want to ensure is visible is located above the viewable region of the control, calling the EnsureVisible method will scroll the contents of the control until it is the first item in the viewable area of the control. If the item is below the viewable region of the control, calling the EnsureVisible method will scroll the contents of the control until the item is the last item in the viewable area of the control.

See Also

Applies To: ListView


Exp Method

Description

Returns e raised to the specified power.

Syntax

Exp( d )

Parameters

d: A number specifying a power.

Return Value

The number e raised to the power d.

See Also

Applies To: Math


FromBase64String Method (Bitmap Object)

Description

Converts the specified String representation of a bitmap consisting of base 64 digits to an equivalent bitmap.

Syntax

object.FromBase64String(string)

Parameters

string
A string of base 64 digits.

Return Value

A Bitmap object.

Remarks

Use the base64.exe utility to convert an image file to base64 format.

Example

$Label.Image = $System.Bitmap.FromBase64String($ClockImage)

$ClockImage = "
Qk0GAwAAAAAAADYAAAAoAAAADwAAAA8AAAABABgAAAAAANACAAAAAAAAAAAAAAAAAAAAAAAA
wMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDA
wMDAAAAAAAAA////AP//////AP//////AAAAAAAAwMDAwMDAwMDAAAAAwMDAwMDAAAAAAP//
////AP//////AP//////AP//////AP//AAAAwMDAwMDAAAAAwMDAAAAAAP//////AP//////
AP//////AP//////AP//////AP//AAAAwMDAAAAAwMDAAAAA////AP//AAAAAP//////AP//
////AP//////AP//////AAAAwMDAAAAAAAAA////AP//////AP//AAAAAP//////AP//////
AP//////AP//////AAAAAAAAAAAAAP//////AP//////AP//AAAAAP//////AP//////AP//
////AP//AAAAAAAAAAAA////AP//////AP//////AP//AAAAAAAAAAAAAAAAAAAAAAAA////
AAAAAAAAAAAAAP//////AP//////AP//////AP//////AP//////AP//////AP//AAAAAAAA
AAAA////AP//////AP//////AP//////AP//////AP//////AP//////AAAAAAAAwMDAAAAA
////AP//////AP//////AP//////AP//////AP//////AAAAwMDAAAAAwMDAAAAAAP//////
AP//////AP//////AP//////AP//////AP//AAAAwMDAAAAAwMDAwMDAAAAAAP//////AP//
////AAAA////AP//////AP//AAAAwMDAwMDAAAAAwMDAwMDAwMDAAAAAAAAA////AP//////
AP//////AAAAAAAAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAA
wMDAwMDAwMDAwMDAwMDAAAAA
"

See Also

Applies To: Bitmap


Hide Method

Description

Hides the control from the user.

Syntax

Hide()


Increment Method

Description

Advances the current position of the progress bar by the specified amount.

Syntax

Increment( Value )

Parameters

Value - a numeric value specifying the amount by which to increment the the progress bar's current position.

Remarks

The Increment method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the Step property with the PerformStep method. The Value property specifies the current position of the ProgressBar. If, after calling the Increment method, the Value property is greater than the value of the Maximum property, the Value property remains at the value of the Maximum property. If, after calling the Increment method with a negative value specified in the value parameter, the Value property is less than the value of the Minimum property, the Value property remains at the value of the Minimum property.

See Also

Applies To: ProgressBar


Insert Method (Columns Collection)

Description

Creates a new column and inserts it into the collection at the specified index.

Syntax

Insert( Index, Text, Width, Alignment )

Parameters

Index - the zero-based index location where the column is inserted.

Text - an optional string value specifying the text to display in the column header. The default is a null string ("").

Width - an optional numeric value specifying the initial width of the column. The default is 100 pixels wide. Use -2 to autosize the column to the size of the text of the column header.

Alignment - an optional numeric value specifying the horizontal alignment of text in the column. Can be one of the Alignment values. The default is Left.

Return Value

A Column representing the newly created column.

See Also

Applies To: Columns


Insert Method (Items Collection)

Description

Creates a new item and inserts it into the collection at the specified index.

Syntax

Insert( Index, Text, ImageIndex )

Parameters

Index - the zero-based index location where the item is inserted.

Text - an optional string value specifying the text of the item.

ImageIndex - an optional numeric value specifying the index of the image to display for the item.

Return Value

An Item object representing the newly created item.

See Also

Applies To: Items


Insert Method (TreeNodeCollection Object)

Description

Inserts a new tree node in the tree node collection at the specified location.

Syntax

object.Insert( index, text, imageIndex, selectedImageIndex )

Parameters

index - The indexed location within the collection to insert the tree node.

text - the label text displayed by the TreeNode.

imageIndex - the index value of image to display when the tree node is unselected.

selectedImageIndex - the index value of Image to display when the tree node is selected.

Return Value

A TreeNode that represents the tree node being inserted into the collection.

Remarks

If the TreeView.Sorted property is set to true, the index parameter value is ignored. The TreeNode is inserted into the tree view and the TreeView resorted. You can also add new TreeNode objects to the collection by using the Add method. To remove a TreeNode that you previously added, use the Remove or Clear methods.

See Also

Applies To: TreeNodeCollection


KeyState Method

Description

Determines whether a keyboard key is up or down at the time the method is called, and whether the key was pressed after a previous call to KeyState.

Syntax

KeyState( Key )

Parameters

Key - the keyboard key to check. Can be one of the KeyCode property values.

Return Value

One of the following values:

Value | Description
0 | The key was not pressed.
non-zero | The key was pressed.


LoadFile Method (RichTextBox Control)

Description

Loads a specific type of file into the RichTextBox control.

Syntax

object.LoadFile( path, type )

Parameters

path - The name and location of the file to load into the control.

type - Optional. One of the RichTextBoxStreamType values. The default is RichText.

Return Value

Nothing.

Remarks

When loading a file with the LoadFile method, the contents of the file being loaded replace the entire contents of the RichTextBox control. This will cause the values of the Text and Rtf properties to change. You can use this method to load a previously created text or Rich Text Format (RTF) document into the control for manipulation. If you want to save the file, you can use the SaveFile method.

You can use this version of the LoadFile method to specify the file type of the file being loaded. This feature enables you to load files other than RTF documents into the control.

See Also

Applies To: RichTextBox


Log Method

Description

Returns the natural (base e) logarithm of a specified number.

Syntax

Log( d )

Parameters

d: A number whose logarithm is to be found.

Return Value

The natural logarithm of d.

See Also

Applies To: Math


Log10 Method

Description

Returns the base 10 logarithm of a specified number.

Syntax

Log10( n )

Parameters

n: A number whose logarithm is to be found.

Return Value

The base 10 log of d/

See Also

Applies To: Math


Paste Method

Description

Replaces the current selection in the control with the contents of the Clipboard.

Syntax

Paste()

Remarks

The Paste method will only paste text into the control if text is currently stored in the Clipboard.


PerformStep Method

Description

Advances the current position of the progress bar by the amount of the Step property.

Syntax

PerformStep()

Remarks

The PerformStep method increments the value of the progress bar by the amount specified by the Step property. You can use the Step property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you may want to set the value of the Step property to 1 and the value of the Maximum property to the total number of files to copy. When each file is copied, you can call the PerformStep method to increment the progress bar by the value of the Step property. If you want to have more flexible control of the value of the progress bar, you can use the Increment method or set the value of the Value property directly.

The Value property specifies the current position of the ProgressBar. If, after calling the PerformStep method, the Value property is greater than the value of the Maximum property, the Value property remains at the value of the Maximum property. If, after calling the PerformStep method with a negative value specified in the value parameter, the Value property is less than the value of the Minimum property, the Value property remains at the value of the Minimum property.


Pow Method

Description

Returns a specified number raised to the specified power.

Syntax

Pow( x, y )

Parameters

x: A number to be raised to a power.

y: A number that specifies a power.

Return Value

The number x raised to the power y.

See Also

Applies To: Math


Refresh Method

Description

Forces the control to invalidate its client area and immediately redraw itself and any child controls.

Syntax

Refresh()


Remove Method (Collection Object)

Summary:

Removes a member from the collection.

Syntax:

object.Remove(index)

Parameters:

index:

An expression that specifies the position of a member of the collection. If a numeric expression, index must be a number from 0 to the value of the collection's Count property (minus one). If a string expression, index must correspond to the Key argument specified when the member referred to was added to the collection.


Remove Method (Columns Collection)

Description

Removes the column at the specified index.

Syntax

Remove( index )

Parameters

index

The zero-based index of the column to remove.

Remarks

When you remove a column from the collection, the indexes change for subsequent columns in the collection. All information about the removed column is deleted. You can use this method to remove a specific column from the collection. To remove all columns from the collection, use the Clear method.


Remove Method (Item Object)

Description

Removes the item from its associated collection.

Syntax

Remove()

Remarks

This method is similar in function to the Remove method of the Items collection in the ListView control that contains the item. You can use this method to remove an item from its ListView control. This feature can be useful if you want to move the item to a different ListView control or need to remove the item based on a request from the user to remove the item from within your application.

See Also

Applies To: Items


Remove Method (Items Collection)

Description

Removes the item at the specified index.

Syntax

Remove( index )

Parameters

index

The zero-based index of the Item to remove.

Remarks

When you remove an Item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. You can use this method to remove a specific item from the collection by specifying the index of the item to remove. To remove all items from the collection, use the Clear method.

See Also

Applies To: Items


Remove Method (ListItemCollection)

Summary:

Removes a ListItem from the collection that represents the specified string.

Syntax:

object.Remove(item)

Parameters:

item:

A string that represents the item to remove from the collection.

See Also:

Applies To: ListItemCollection


Remove Method (TabPages Collection)

Description

Removes the tab page at the specified index.

Syntax

Remove( index )

Parameters

index - the zero-based index of the tab page to remove.

Remarks

When you remove a tab page from the collection, the indexes change for subsequent pages in the collection. All information about the removed page is deleted.

See Also

Applies To: TabPages


Remove Method (TreeNode Object)

Description

Removes the current tree node from the tree view control.

Syntax

object.Remove()

Remarks

When the Remove method is called, the tree node and any child tree nodes assigned to the TreeNode are removed from the TreeView.

See Also

Applies To: TreeNode


Remove Method (TreeNodeCollection)

Description

Removes the specified tree node from the tree node collection.

Syntax

object.Remove( node )

Parameters

node - The TreeNode to remove.

Remarks

When a TreeNode is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. To add new TreeNode objects to the collection, use the Add or Insert methods.

See Also

Applies To: TreeNodeCollection


RemoveAt Method (ListItemCollection)

Summary:

Removes the ListItem at the specified index from the collection.

Syntax:

object.RemoveAt(index)

Parameters:

index:

The index of the ListItem to remove.

See Also:

Applies To: ListItemCollection


RemoveItem Method

Description

Removes the item at the specified index from the list portion of the specified object.

Syntax

RemoveItem( Index )

Parameters

Index - the zero-based index of the item to be removed. Valid values range from zero to one less than the total number of items in the list.

See Also

Applies To: ComboBox | ListBox


SaveFile Method (RichTextBox Control)

Description

Saves the contents of the RichTextBox to a specific type of file.

Syntax

SaveFile( path, type )

Parameters

path - The name and location of the file to save.

type - Optional. One of the RichTextBoxStreamType values. The default is RichText.

Return Value

Nothing.

Remarks

The SaveFile method enables you to save the entire contents of the control to an RTF file that can be used by other programs such as Microsoft Word and Windows WordPad. If the file name that is passed to the path parameter already exists at the specified directory, the file will be overwritten without notice. You can use the LoadFile method to load the contents of a file into the RichTextBox.

The SaveFile method enables you to specify a file type to save the contents of the control to. You can use this feature to ensure that the file is saved in the proper format based on the contents of the control. For example, if your document has no differences in font style or coloring, you can save the file as an ASCII text file by setting the fileType parameter to plain text.

See Also

Applies To: RichTextBox


ScrollToCaret Method

Description

Scrolls the contents of the control to the current caret position.

Syntax

ScrollToCaret()

Remarks

This method enables you to scroll the contents of the control until the caret is within the visibile region of the control. If the caret is positioned below the visible region of the control, the ScrollToCaret method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control.

Note: This method has no effect if the control does not have focus or if the caret is already positioned in the visible region of the control.

See Also

Applies To: TextBox


SetFocus Method

Descriptrion

Sets input focus to the control.

Syntax

SetFocus()

Remarks

The control should be visible to receive the input focus.


Shell Method

Description

Loads and runs a program.

Syntax

object.Shell(command, window-style, redirection)

Parameters

command

Command can be any 16-bit or 32-bit application. To run command interpreter commands, specify the correct command interpreter as part of the command.

window-style (optional)

One of the following values:

Value | Setting | Description
0 | Hidden | Window is hidden and focus is passed to the hidden window.
1 | Normal (focused) | Window has focus and is restored to its original size and position.
2 | Minimized (focused) | Window is displayed as an icon with focus. This is the default.
3 | Maximized | Window is maximized with focus.
4 | Normal | Window is restored to its most recent size and position. The currently active window remains active.
6 | Minimized | Window is displayed as an icon. The currently active window remains active.

redirection (optional)

One of the following values:
Value | Setting | Description
0 | None | No redirection. This is the default.
1 | Stdout | Redirect standard output.
2 | Stderr | Redirect standard error.
3 | Both | Redirect both standard output and standard error.

Return Value

If redirection is specified, returns the redirected output as a string; otherwise, returns the integer exit code of the command.

Remarks

Script execution is stopped until the program exits.

Example

$Listing = $System.Shell("cmd /c dir c:\myfolder", 0, 3)

For Each $Line In Split($Listing, @CRLF)
 ?"Line=" $Line
Next

See Also

Applies To: System


Sin Method

Summary:

Returns the sine of the specified angle.

Syntax:

object.Sin(a)

Parameters:

a - A numeric expression representing an angle, measured in radians.

Return Values:

A double representing the sine of a.

Remarks

The angle, d, must be in radians. Multiply by p/180 to convert degrees to radians.

See Also

Applies To: Math


Show Method

Description

Shows the control to the user.

Syntax

Show

Return Value

Nothing.

Remarks

Showing the control is equivalent to setting the Visible property to true. After the Show method is called, the Visible property returns a value of true until the Hide method is called.


Show Method (ContextMenu)

Summary:

Displays the shortcut menu at the specified position.

Syntax:

object.Show(control, xpos, ypos)

Parameters:

control:

The object with which this shortcut menu is associated.

xpos:

A numeric value that specifies the x-coordinate at which to display the menu.

ypos:

A numeric value that specifies the y-coordinate at which to display the menu.

Return Values:

Nothing in the current release. But this may change in a subsequent release. Advise to silence this function to maintain going-forward compatibility.

Remarks:

The x/y coordinates are specified relative to the client coordinates of the control specified in the control parameter.

See Also:

Applies To: ContextMenu


Show Method (InputBox Object)

Description

Displays the input box for user input.

Syntax

Show( prompt, title, default, xpos, ypos)

Parameters

prompt

A string expression displayed as the message in the dialog box. The maximum length of Prompt is approximately 1024 characters, depending on the width of the characters used. If Prompt consists of more than one line, you can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or a carriage return/linefeed character combination (Chr(13) & Chr(10)) between each line.

title

An optional string expression displayed in the title bar of the dialog box. If you omit Title, the application name is placed in the title bar.

default

An optional string expression displayed in the text box as the default response if no other input is provided. If you omit Default, the displayed text box is empty.

xpos

An optional numeric expression that specifies, in pixels, the distance of the left edge of the dialog box from the left edge of the screen. If you omit xpos, the dialog box is centered horizontally.

ypos

An optional numeric expression that specifies, in pixels, the distance of the upper edge of the dialog box from the top of the screen. If you omit ypos, the dialog box is positioned vertically approximately one-third of the way down the screen.

Return Value

A string containing the information entered in the dialog. If the dialog was dismissed, returns an empty string ("").

See Also

Applies To: InputBox


Show Method (MessageBox Object)

Description

Displays a message box with the specified text, caption, buttons, icon, default button, and options.

Syntax

Show( text, caption, buttons, icon, defaultButton, options )

Parameters

text

A string value specifying the text to display in the message box.

caption

An optional string value specifying the text to display in the title bar of the message box.

buttons

An optional MessageBoxButtons value that specifies which buttons to display in the message box.

icon

An optional MessageBoxIcon value that specifies which icon to display in the message box.

defaultButton

One of the MessageBoxDefaultButton values the specifies the default button for the message box.

options

A bitwise combination of the MessageBoxOptions values that specifies which display and association options will be used for the message box.

Return Value

One of the DialogResult values.

Remarks

By default, the message box displays an OK button.

See Also

Applies To: MessageBox


ShowDialog Method

Description

Runs a common dialog box.

Syntax

object.ShowDialog()

Return Value

One of the following values:

Value | Meaning | Description
0 | None | Nothing is returned from the dialog box. This means that the modal dialog continues running.
1 | OK | The dialog box return value is OK (usually sent from a button labeled OK).
2 | Cancel | The dialog box return value is Cancel (usually sent from a button labeled Cancel).
3 | Abort | The dialog box return value is Abort (usually sent from a button labeled Abort).
4 | Retry | The dialog box return value is Retry (usually sent from a button labeled Retry).
5 | Ignore | The dialog box return value is Ignore (usually sent from a button labeled Ignore).
6 | Yes | The dialog box return value is Yes (usually sent from a button labeled Yes).
7 | No | The dialog box return value is No (usually sent from a button labeled No).

Remarks

You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed.

When a form is displayed as a modal dialog box, clicking the close form button (the button with an "X" at the top right of the form) causes the form to be hidden and the return value to be set to Cancel.

See Also

Applies to: ColorDialog | FolderBrowserDialog | FontDialog | Form | OpenFileDialog | SaveFileDialog


ShowModal Method

Description

Shows the form as a modal dialog box.

Syntax

ShowModal()

Return Value

Nothing

Remarks

ShowModal is used to show a form "modally" which effectively disables all other forms in an application. Examples of modal forms include error boxes and dialogs. If any form recieves a ShowModal form, it will gain focus, and must be "resolved" before any other form may be clicked on or interacted with.

See Also

Applies To: Form


Start Method

Description

Starts the timer.

Syntax

Start()

Remarks

You can also start the timer by setting the Enabled property to true.

See Also

Applies To: Timer


Stop Method

Description

Stops the timer.

Syntax

Stop()

Remarks

You can also stop the timer by setting the Enabled property to false.

See Also

Applies To: Timer


Sqrt Method

Description

Returns the square root of the specfied number.

Syntax

Sqrt ( n )

Parameters

n: The number.

Return Value

A number representing the square root of n.

See Also

Applies To: Math


Undo Method

Description

Undoes the last edit operation in the text box.

Syntax

Undo()


OnAbout Event

Description

Gets or sets the event handler that is called when the "About..." menu item in the system menu is clicked.

Syntax

OnAbout [ = String ]

See Also

Applies To: Form


OnActivate Event

Description

Gets or sets the event handler that is called when the form is activated by the user.

Syntax

OnActivate [ = String ]

See Also

Applies To: Form


OnAfterSelect Event

Description

Gets or sets the code to execute after a tree node is selected.

Syntax

object.OnAfterSelect [ = "code" ]

Property Value

The code to execute after a tree node is selected.

Event Data

The System.Sender property contains the object that raised the event. The System.EventArgs property receives a value of type EventArgs containing data related to this event. The following EventArgs properties provide information specific to this event.

Property | Description
Node | Gets the tree node that has been checked, expanded, collapsed, or selected.

See Also

Applies To: TreeView


OnBeforeExpand Event

Description

Gets or sets the event handler that is called before the tree node is expanded.

Syntax

object.OnBeforeExpand [ = String ]

Event Data

The System.Sender property contains the object that raised the event. The System.EventArgs property receives a value of type EventArgs containing data related to this event. The following EventArgs properties provide information specific to this event.

Property | Description
Cancel | Gets or sets a value indicating whether the event should be canceled.
Node | Gets the tree node that has been checked, expanded, collapsed, or selected.


OnClick Event

Description

Gets or sets the event handler that is called when the control is clicked.

Syntax

object.OnClick [ = String ]

Event Data

The System.Sender property contains the object that raised the event.

Example

$Button.OnClick = "Button_Click()"


OnClick Event (MenuItem Object)

Description

Gets or sets the event handler that is called when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.

Syntax

object.OnClick [ = String ]

Event Data

These is no event data associated with this event.

Remarks

The Click event occurs when this MenuItem is clicked by the user. This event also occurs if the user selects the menu item using the keyboard and presses the Enter key. It can also occur if an access key or shortcut key is pressed that is associated with the MenuItem.

Note If the MenuItems property for the MenuItem contains any items, this event is not raised. This event is not raised for parent menu items.

Example

$MenuItem.OnClick = "MenuItem_Click()"


OnDeactivate Event

Description

Gets or sets the event handler that is called when the form loses focus and is not the active form.

Syntax

OnDeactivate [ = String ]


OnDoubleClick Event

Summary:

Gets or sets the event handler that is called when the control is double-clicked.

Syntax:

object.OnDoubleClick [ = string ]


OnGotFocus Event

Description

Gets or sets the event handler that is called when the control receives the focus.

Syntax

OnGotFocus [ = String ]


OnKeyDown Event

Description

Gets or sets the event handler that is called when a key a pressed while the control has the focus.

Syntax

OnKeyDown [ = String ]


OnLostFocus Event

Description

Gets or sets the event handler that is called when the control loses the focus.

Syntax

OnLostFocus [ = String ]


OnMouseDown Event

Description

Gets or sets the code to execute when the mouse pointer is over the control and a mouse button is pressed.

Syntax

object.OnMouseDown [ = String ]

Event Data

The System.Sender property contains the object that raised the event. The System.EventArgs property receives a value of type EventArgs containing the following properties:

Property | Description
Button | Gets which mouse button was pressed.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.


OnMouseEnter Event

Description

Gets or sets the event handler that is called when the mouse pointer enters the control.

Syntax

object.OnMouseEnter [ = String ]

Event Data

The System.Sender property contains the object that raised the event.

See Also

Applies To: Button | CheckBox | Form | HyperLink | Label | ListBox | ListView | ProgressBar | RadioButton | TabControl | TabPage | TextBox | ToolButton | TrackBar


OnMouseLeave Event

Description

Gets or sets the event handler that is called when the mouse pointer leaves the control.

Syntax

object.OnMouseLeave [ = String ]

Event Data

The System.Sender property contains the object that raised the event.

See Also

Applies To: Button | CheckBox | Form | HyperLink | Label | ListBox | ListView | ProgressBar | RadioButton | TabControl | TabPage | TextBox | ToolButton | TrackBar


OnMouseMove Event

Description

Gets or sets the event handler that is called when the mouse pointer is moved over the control.

Syntax

object.OnMouseMove [ = String ]

Event Data

The System.Sender property contains the object that raised the event. The System.EventArgs property receives a value of type EventArgs containing data related to this event. The following EventArgs properties provide information specific to this event.

Property | Description
Button | Gets which mouse button was pressed.
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.

Example

$Form.OnMouseMove = "Form_MouseMove()"

Function Form_MouseMove()

 $e = $System.EventArgs

 ? "x=" + $e.x

EndFunction


OnMouseUp Event

Description

Gets or sets the event handler that is called when the mouse pointer is over the control and a mouse button is released.

Syntax

object.OnMouseUp [ = String ]

Event Data

The System.Sender property contains the object that raised the event. The System.EventArgs property receives a value of type EventArgs containing data related to this event. The following EventArgs properties provide information specific to this event.

Property | Description
Button | Gets which mouse button was pressed (under development).
X | Gets the x-coordinate of a mouse click.
Y | Gets the y-coordinate of a mouse click.


OnMove Event

Description

Occurs when a control is moved.

Syntax

OnMove [ = String ]


OnResize Event

Description

Occurs after the form is resized.

Syntax

OnResize [ = String ]

Property Value

A string expression specifying the event handler that is called after the form is resized.

Remarks

Also occurs after the form is minimized or maximized. This event occurs after the form is resized, more specifically, after the mouse capture has been released. It is not possible to capture in-progress resize events in the current release. However, one should assume that this is the case in that this feature may be available in a future release.


OnScroll Event

Description

Gets or sets the event handler that is called when either a mouse or keyboard action moves the slider.

Syntax

OnScroll [ = String ]


OnSelectedIndexChanged Event

Description

Gets or sets the event handler that is called when the SelectedIndex property changes.

Syntax

OnSelectedIndexChanged [ = String ]

See Also

Applies To: ComboBox | TabControl


OnSpinDown Event

Description

Gets or sets the event handler that is called when either a mouse or keyboard action moves the slider.

Syntax

OnSpinDown [ = String ]


OnSpinUp Event

Description

Gets or sets the event handler that is called when either a mouse or keyboard action moves the slider.

Syntax

OnSpinUp [ = String ]


OnTextChanged Event

Description

Gets or sets the event handler that is called when the Text property value changes.

Syntax

object.OnTextChanged [ = "String" ]

Property Value

The event handler that is called when the Text property value changes.

Event Data

The System.Sender property contains the object that raised the event.

Remarks

This event is raised if the Text property is changed by either a programmatic modification or user interaction.

Example

$TextBox.OnTextChanged = "TextBox_TextChanged()"

See Also

Applies To: ComboBox | MaskedTextBox | RichTextBox | TextBox


OnTick Event

Description

Gets or sets the event handler that is called when the specified timer interval has elapsed and the timer is enabled.

Syntax

OnTick [ = String ]


Appearance Enumeration

Description

Specifies the appearance of a control.

Members

Name | Description | Value
Button | The appearance of a Windows button. | 1
Normal | The default appearance defined by the control class. | 0


Color Values

Summary:

Specifies a color.

Property Values:

long

A number in the range &0 to &FFFFFF representing a valid RGB color. The blue color component is encoded in the high-order byte; the green color component is encoded in the middle byte and the Red color component is encoded in the low-order byte, examples:

$Object.Color = &0000FF ; Red
$Object.Color = &00FF00 ; Green
$Object.Color = &FF0000 ; Blue
$Object.Color = &00FFFF ; Yellow

long, long, long

An array of three numbers each in the range 0 to 255 representing the valid red, green and blue color components of a RGB color, examples:

$Object.Color = 255, 0, 0    ; Red
$Object.Color = 0, 255, 0    ; Green
$Object.Color = 0, 0, 255    ; Blue
$Object.Color = 255, 255, 0  ; Yellow

string

A string expression that evaluates to a well-known system color. The following colors are supported:

Color | String Value | Hex Value | Red Value | Green Value | Blue Value
 | AliceBlue | FFF8F0 | 240 | 248 | 255
 | AntiqueWhite | D7EBFA | 250 | 235 | 215
 | Aqua | FFFF00 | 0 | 255 | 255
 | Aquamarine | D4FF7F | 127 | 255 | 212
 | Azure | FFFFF0 | 240 | 255 | 255
 | Beige | DCF5F5 | 245 | 245 | 220
 | Bisque | C4E4FF | 255 | 228 | 196
 | Black | 000000 | 0 | 0 | 0
 | BlanchedAlmond | CDEBFF | 255 | 235 | 205
 | Blue | FF0000 | 0 | 0 | 255
 | BlueViolet | E22B8A | 138 | 43 | 226
 | Brown | 2A2AA5 | 165 | 42 | 42
 | BurlyWood | 87B8DE | 222 | 184 | 135
 | CadetBlue | A09E5F | 95 | 158 | 160
 | Chartreuse | 00FF7F | 127 | 255 | 0
 | Chocolate | 1E69D2 | 210 | 105 | 30
 | Coral | 507FFF | 255 | 127 | 80
 | CornflowerBlue | ED9564 | 100 | 149 | 237
 | Cornsilk | DCF8FF | 255 | 248 | 220
 | Crimson | 3C14DC | 220 | 20 | 60
 | Cyan | FFFF00 | 0 | 255 | 255
 | DarkBlue | 8B0000 | 0 | 0 | 139
 | DarkCyan | 8B8B00 | 0 | 139 | 139
 | DarkGoldenrod | BB86B8 | 184 | 134 | 11
 | DarkGray | A9A9A9 | 169 | 169 | 169
 | DarkGreen | 006400 | 0 | 100 | 0
 | DarkKhaki | 6BB7BD | 189 | 183 | 107
 | DarkMagenta | 8B008B | 139 | 0 | 139
 | DarkOliveGreen | 2F6B55 | 85 | 107 | 47
 | DarkOrange | 008CFF | 255 | 140 | 0
 | DarkOrchid | CC3299 | 153 | 50 | 204
 | DarkRed | 00008B | 139 | 0 | 0
 | DarkSalmon | 7A96E9 | 233 | 150 | 122
 | DarkSeaGreen | 8BBC8F | 143 | 188 | 139
 | DarkSlateBlue | 8B3D48 | 72 | 61 | 139
 | DarkSlateGray | 4F4F2F | 47 | 79 | 79
 | DarkTurquoise | D1CE00 | 0 | 206 | 209
 | DarkViolet | D30094 | 148 | 0 | 211
 | DeepPink | 9314FF | 255 | 20 | 147
 | DeepSkyBlue | FFBF00 | 0 | 191 | 255
 | DimGray | 696969 | 105 | 105 | 105
 | DodgerBlue | FF901E | 30 | 144 | 255
 | Firebrick | 2222B2 | 178 | 34 | 34
 | FloralWhite | F0FAFF | 255 | 250 | 240
 | ForestGreen | 228B22 | 34 | 139 | 34
 | Fuchsia | FF00FF | 255 | 0 | 255
 | Gainsboro | DCDCDC | 220 | 220 | 220
 | GhostWhite | FFF8F8 | 248 | 248 | 255
 | Gold | 00D7FF | 255 | 215 | 0
 | Goldenrod | 20A5DA | 218 | 165 | 32
 | Gray | 808080 | 128 | 128 | 128
 | Green | 008000 | 0 | 128 | 0
 | GreenYellow | 2FFFAD | 173 | 255 | 47
 | Honeydew | F0FFF0 | 240 | 255 | 240
 | HotPink | B469FF | 255 | 105 | 180
 | IndianRed | 5C5CCD | 205 | 92 | 92
 | Indigo | 82004B | 75 | 0 | 130
 | Ivory | F0FFFF | 255 | 255 | 240
 | Khaki | 8CE6F0 | 240 | 230 | 140
 | Lavender | FAE6E6 | 230 | 230 | 250
 | LavenderBlush | F5F0FF | 255 | 240 | 245
 | LawnGreen | 00FC7C | 124 | 252 | 0
 | LemonChiffon | CDFAFF | 255 | 250 | 205
 | LightBlue | E6D8AD | 173 | 216 | 230
 | LightCoral | 8080F0 | 240 | 128 | 128
 | LightCyan | FFFFE0 | 224 | 255 | 255
 | LightGoldenrodYellow | D2FAFA | 250 | 250 | 210
 | LightGray | D3D3D3 | 211 | 211 | 211
 | LightGreen | 90EE90 | 144 | 238 | 144
 | LightPink | C1B6FF | 255 | 182 | 193
 | LightSalmon | 7AA0FF | 255 | 160 | 122
 | LightSeaGreen | AAB220 | 32 | 178 | 170
 | LightSkyBlue | FACE87 | 135 | 206 | 250
 | LightSlateGray | 998877 | 119 | 136 | 153
 | LightSteelBlue | DEC4B0 | 176 | 196 | 222
 | LightYellow | E0FFFF | 255 | 255 | 224
 | Lime | 00FF00 | 0 | 255 | 0
 | LimeGreen | 32CD32 | 50 | 205 | 50
 | Linen | E6F0FA | 250 | 240 | 230
 | Magenta | FF00FF | 255 | 0 | 255
 | Maroon | 000080 | 128 | 0 | 0
 | MediumAquamarine | AACD66 | 102 | 205 | 170
 | MediumBlue | CD0000 | 0 | 0 | 205
 | MediumOrchid | D355BA | 186 | 85 | 211
 | MediumPurple | DB7093 | 147 | 112 | 219
 | MediumSeaGreen | 71B33C | 60 | 179 | 113
 | MediumSlateBlue | EE687B | 123 | 104 | 238
 | MediumSpringGreen | 9AFA00 | 0 | 250 | 154
 | MediumTurquoise | CCD148 | 72 | 209 | 204
 | MediumVioletRed | 8515C7 | 199 | 21 | 133
 | MidnightBlue | 701919 | 25 | 25 | 112
 | MintCream | FAFFF5 | 245 | 255 | 250
 | MistyRose | E1E4FF | 255 | 228 | 225
 | Moccasin | B5E4FF | 255 | 228 | 181
 | NavajoWhite | ADDEFF | 255 | 222 | 173
 | Navy | 800000 | 0 | 0 | 128
 | OldLace | E6F5FD | 253 | 245 | 230
 | Olive | 008080 | 128 | 128 | 0
 | OliveDrab | 238E6B | 107 | 142 | 35
 | Orange | 00A5FF | 255 | 165 | 0
 | OrangeRed | 0045FF | 255 | 69 | 0
 | Orchid | D670DA | 218 | 112 | 214
 | PaleGoldenrod | AAE8EE | 238 | 232 | 170
 | PaleGreen | 98FB98 | 152 | 251 | 152
 | PaleTurquoise | EEEEAF | 175 | 238 | 238
 | PaleVioletRed | 9370DB | 219 | 112 | 147
 | PapayaWhip | D5EFFF | 255 | 239 | 213
 | PeachPuff | B9DAFF | 255 | 218 | 185
 | Peru | 3F85CD | 205 | 133 | 63
 | Pink | CBC0FF | 255 | 192 | 203
 | Plum | DDA0DD | 221 | 160 | 221
 | PowderBlue | E6E0B0 | 176 | 224 | 230
 | Purple | 800080 | 128 | 0 | 128
 | Red | 0000FF | 255 | 0 | 0
 | RosyBrown | 8F8FBC | 188 | 143 | 143
 | RoyalBlue | E16941 | 65 | 105 | 225
 | SaddleBrown | 13458B | 139 | 69 | 19
 | Salmon | 7280FA | 250 | 128 | 114
 | SandyBrown | 60A4F4 | 244 | 164 | 96
 | SeaGreen | 578B2E | 46 | 139 | 87
 | SeaShell | EEF5FF | 255 | 245 | 238
 | Sienna | 2D52A0 | 160 | 82 | 45
 | Silver | C0C0C0 | 192 | 192 | 192
 | SkyBlue | EBCE87 | 135 | 206 | 235
 | SlateBlue | CD5A6A | 106 | 90 | 205
 | SlateGray | 908070 | 112 | 128 | 144
 | Snow | FAFAFF | 255 | 250 | 250
 | SpringGreen | 7FFF00 | 0 | 255 | 127
 | SteelBlue | B48246 | 70 | 130 | 180
 | Tan | 8CB4D2 | 210 | 180 | 140
 | Teal | 808000 | 0 | 128 | 128
 | Thistle | D8BFD8 | 216 | 191 | 216
 | Tomato | 4763FF | 255 | 99 | 71
 | Turquoise | D0E040 | 64 | 224 | 208
 | Violet | EE82EE | 238 | 130 | 238
 | Wheat | B3DEF5 | 245 | 222 | 179
 | White | FFFFFF | 255 | 255 | 255
 | WhiteSmoke | F5F5F5 | 245 | 245 | 245
 | Yellow | 00FFFF | 255 | 255 | 0
 | YellowGreen | 32CD9A | 154 | 205 | 50


ColorDepth Enumeration

Description

Specifies the number of colors used to display an image in an ImageList control.

Members

Name | Description | Value
Depth4Bit | A 4-bit image | 4
Depth8Bit | A 8-bit image | 8
Depth16Bit | A 16-bit image | 16
Depth24Bit | A 24-bit image | 24
Depth32Bit | A 32-bit image | 32


DialogResult Enumeration

Description

Specifies identifiers to indicate the return value of a dialog box.

Members

Name | Description | Value
Abort | The dialog box return value is Abort (usually sent from a button labeled Abort). | 3
Cancel | The dialog box return value is Cancel (usually sent from a button labeled Cancel). | 2
Ignore | The dialog box return value is Ignore (usually sent from a button labeled Ignore). | 5
No | The dialog box return value is No (usually sent from a button labeled No). | 7
None | Nothing is returned from the dialog box. This means that the modal dialog continues running. | 0
OK | The dialog box return value is OK (usually sent from a button labeled OK). | 1
Retry | The dialog box return value is Retry (usually sent from a button labeled Retry). | 4
Yes | The dialog box return value is Yes (usually sent from a button labeled Yes). | 6


FontStyle Enumeration

Description

Specifies style information applied to text.

Members

Name | Description | Value
Bold | Bold text. | 1
Italic | Italic text. | 2
Regular | Normal text. | 0
StrikeOut | Text with a line through the middle. | 8
Underline | Undelined text. | 4


MessageBoxButtons Enumeration

Description

Specifies constants defining which buttons to display on a MessageBox.

Members

Name | Description | Value
AbortRetryIgnore | Displays Abort, Retry, and Ignore buttons. | 2
OK | Displays OK button. | 0
OKCancel | Displays OK and Cancel buttons. | 1
RetryCancel | Displays Retry and Cancel buttons. | 5
YesNo | Displays Yes and No buttons. | 4
YesNoCancel | Displays Yes, No, and Cancel buttons. | 3


MessageBoxDefaultButton Enumeration

Description

Specifies constants defining the default button on a MessageBox.

Members

Name | Description | Value
Button1 | First button is default. | 0
Button2 | Second button is default. | 256
Button3 | Third button is default. | 512


MessageBoxIcon Enumeration

Description

Specifies constants defining which icon to display on a MessageBox.

Members

Name | Description | Value
Asterisk | The message box contains a symbol consisting of a lowercase letter i in a circle. | 64
Error | The message box contains a symbol consisting of white X in a circle with a red background. | 16
Exclamation | The message box contains a symbol consisting of an exclamation point in a triangle with a yellow background. | 48
Hand | The message box contains a symbol consisting of a white X in a circle with a red background. | 16
Information | The message box contains a symbol consisting of a lowercase letter i in a circle. | 64
None | The message box contain no symbols. | 0
Question | The message box contains a symbol consisting of a question mark in a circle. | 32
Stop | The message box contains a symbol consisting of white X in a circle with a red background. | 16
Warning | The message box contains a symbol consisting of an exclamation point in a triangle with a yellow background. | 48


MessageBoxOptions Enumeration

Description

Specifies options on a MessageBox.

Members

Name | Description | Value
DefaultDesktopOnly | The message box is displayed on the active desktop. This constant is the same as ServiceNotification except that the system displays the message box only on the default desktop of the interactive window station. | 131072
RightAlign | The message box text is right-aligned. | 524288
RtlReading | Specifies that the message box text is displayed with right to left reading order. | 1048576
ServiceNotification | The message box is displayed on the active desktop. The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer. | 2097152


RichTextBoxStreamType Enumeration

Description

Specifies the types of input and output streams used to load and save data in the RichTextBox control.

Members

Value | Name | Description
0 | RichText | A Rich Text Format (RTF) stream.
1 | PlainText | A plain text stream that includes spaces in places of Object Linking and Embedding (OLE) objects.

See Also

Applies To: System


ColorDialog Example

The following example displays a form and a button. When the button is clicked, a ColorDialog is presented to the user. If the user presses the OK button, the background color of the form is changed to the color selected by the user.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Button = $Form.Controls.Add("Button")
$Button.Text = "ColorDialog"
$Button.Center
$Button.OnClick = "Button_Click()"

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function Button_Click()

 Dim $ColorDialog

 $ColorDialog = $System.ColorDialog()

 $ColorDialog.Color = $Form.BackColor

 If $ColorDialog.ShowDialog = 1
  $Form.BackColor = $ColorDialog.Color
 Endif

EndFunction


FontDialog Example

The following example displays a Form with a Textbox and a Button. When the user clicks the button, a FontDialog is displayed asking the user to select a new Font. If the user clicks OK, the new font style is used by the textbox.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$TextBox = $Form.Controls.Add("TextBox")
$TextBox.MultiLine = 1
$TextBox.Width = $Form.ClientWidth - 20
$TextBox.Height = 0.75 * $Form.ClientHeight
$TextBox.Center
$TextBox.Top = 10
$TextBox.Text = "The quick brown Fox jumped over the lazy moon."
$TextBox.Anchor = 15

$Button = $Form.Controls.Add("Button")
$Button.Text = "Font"
$Button.Center
$Button.Top = $TextBox.Bottom + 10
$Button.OnClick = "Button_Click()"
$Button.Anchor = 10

$Form.Show

While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function Button_Click

 Dim $FontDialog

 $FontDialog = $System.FontDialog()

 $FontDialog.Font = $TextBox.Font

 If $FontDialog.ShowDialog = 1 ; ok
  $TextBox.Font = $FontDialog.Font
 Endif

EndFunction


NotifyIcon Example

The following example demonstrates using the NotifyIcon class to display an icon for an application in the notification area. The example demonstrates setting the Icon, Text and Visible properties and handling the DoubleClick event.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Form.Text = "NotifyIcon Example"
$Form.Icon = $System.BuiltinIcons(0)
$Form.OnResize = "Form_Resize()"

$FileMenu = $Form.Menu.MenuItems.Add("File")

$ExitMenu = $FileMenu.MenuItems.Add("Exit")
$ExitMenu.OnClick = "ExitMenu_Click()"

$NotifyIcon = $System.NotifyIcon()
$NotifyIcon.Icon = $Form.Icon
$NotifyIcon.Text = $Form.Text
$NotifyIcon.Visible = "True"
$NotifyIcon.OnDoubleClick = "NotifyIcon_DoubleClick()"

$Form.Running = 1
While $Form.Running
 $= Execute($Form.DoEvents)
Loop

Exit 1

Function NotifyIcon_DoubleClick()

 If Not $Form.Visible Or $Form.WindowState = 1
  $Form.WindowState = 0
  $Form.Show()
  $Form.Activate()
 Endif

EndFunction

Function Form_Resize()

 If $Form.WindowState = 1
  $Form.Hide()
 Endif

EndFunction

Function ExitMenu_Click()

 $Form.Running = 0

EndFunction


NotifyIcon Example

The following example demonstrates using the NotifyIcon class without a form. It implements a clock running in the system tray. A timer is used to update the clock every second. Hover the mouse over the icon to display the time. Double-click the tray icon to stop the program. This example uses the static DoEvents methods of the Application class to run in form-less mode.

Break On

; Imports System

$System = CreateObject("Kixtart.System")

; Create the NotifyIcon.

$NotifyIcon1 = $System.NotifyIcon()

; The Icon property sets the icon that will appear
; in the systray for this application.

$NotifyIcon1.Icon = $System.BuiltinIcons(63) ; Clock

; The Text property sets the text that will be displayed,
; in a tooltip, when the mouse hovers over the systray icon.

$NotifyIcon1.Text = "@DATE - @TIME"

; This will occur when the icon is double-clicked.

$NotifyIcon1.OnDoubleClick = "DoubleClick()"

; Create a timer to update the tooltip clock every second.

$Timer1 = $System.Timer()
$Timer1.Interval = 1000
$Timer1.OnTick = "Tick()"

$Timer1.Start()

$NotifyIcon1.Visible = True
While $NotifyIcon1.Visible
 $= Execute($System.DoEvents)
Loop

Exit 1

Function Tick()

 $NotifyIcon1.Text = "@DATE - @TIME"

EndFunction

Function DoubleClick()

 ; Ask the user if they want to exit.

 If $System.MessageBox.Show("The date and time is @DATE @TIME. "+
  "Would you like to exit this program now ?",
  "NotifyIcon Timer",
  $System.MessageBoxButtons.YesNo,
  $System.MessageBoxIcon.Question,
  $System.MessageBoxDefaultButton.Button2 ) = $System.DialogResult.Yes

 ; If yes, hide the icon which stops the DoEvents loop.

  $NotifyIcon1.Visible = 0

 EndIf

EndFunction


OpenFileDialog Example

The following example creates an OpenFileDialog, sets several properties, and displays the dialog box using the ShowDialog method.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Form.Button1 = $Form.Controls.Add("Button")
$Form.Button1.Center
$Form.Button1.Text = "click..."
$Form.Button1.OnClick = "Button1_Click()"

$Form.OpenFileDialog1 = $System.OpenFileDialog()
$Form.OpenFileDialog1.InitialDirectory = "c:\"
$Form.OpenFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
$Form.OpenFileDialog1.FilterIndex = 2
$Form.OpenFileDialog1.RestoreDirectory = True

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function Button1_Click()

 If $Form.OpenFileDialog1.ShowDialog() = $System.DialogResult.OK

  $= $System.MessageBox.Show("You Selected " + $Form.OpenFileDialog1.Filename)

 EndIf

EndFunction


Splitter Example

To create a window similar to Windows Explorer, add a TreeView control to a form and set its Dock property to Left. Add a Splitter control to the form and set its Dock property to Left as well. To complete the form layout, add a ListView control and set its Dock property to Fill to have the ListView occupy the remaining space on the form. At run time, the user can then resize the width of the TreeView control (as well as the ListView control) by moving the Splitter control.

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()
$Form.Size = 640,480
$Form.Center()

$Form.ToolGroupBox = $Form.GroupBox()
$Form.ToolGroupBox.Height = 30
$Form.ToolGroupBox.Dock = 1

$Form.StatusGroupBox = $Form.GroupBox()
$Form.StatusGroupBox.Height = 20
$Form.StatusGroupBox.Dock = 2

$Form.TreeView1 = $Form.TreeView()
$Form.TreeView1.Width = $Form.ClientWidth / 4
$Form.TreeView1.Dock = 3

$Form.Splitter1 = $Form.Splitter()
$Form.Splitter1.Dock = 3

$Form.ListView1 = $Form.ListView()
$Form.ListView1.Dock = 5

$Form.Show
While $Form.Visible
 $=Execute($System.Application.DoEvents)
Loop

Exit 1


DoEvents Method (Application Object)

Description

Gets the next Windows message currently in the message queue.

Syntax

DoEvents( wait )

Parameters

wait
Optional. A boolean expression indicating whether DoEvents should wait for an event to occur before returning control back to your script. If True the method will wait , otherwise it will return immediately. The default is true.

Return Value

A string representing the next event in the message queue.

Remarks

DoEvents is typically used along with the Execute function to form an application event loop, for example:

$Form.Show()
While $Form.Visible
 $=Execute($System.Application.DoEvents)
Loop

Note: This method differs from the legacy DoEvents method in that the meaning of wait/async parameter is reversed.

See Also

Applies To: Application


Application Object

Description

Provides static methods and properties to manage an application, such as methods to process Windows messages, and properties to get information about an application.

Remarks

The Application class has methods to process Windows messages. Call DoEvents to process messages while your program is in a loop.


ContextMenu Members

Properties

ImageList (inherited from Menu)
MenuItems (inherited from Menu)
Style (inherited from Menu)


ShowDialog Method (Form Object)

Description

Shows the form as a modal dialog box.

Syntax

ShowDialog( wait )

Parameters

wait

An optional boolean value indicating whether the form should operate as a synchronous dialog box. If true, the form will suspend execution of your script and wait for a button click or for the form to be closed, before returning control back to your script. The default is false.

Return Value

One of the DialogResult values.

See Also

Applies To: Form


GridViewColumnCollection Object

Summary:

A collection of GridViewColumn objects.

Note: This collection cannot be enumerated in the current release.


GridViewColumn Object

Summary:

Represents a column in a GridView control.


GridView Object

Description

Displays data in a customizable tablelike grid.


GridViewRowCollection Object

Summary:

Represents a collection of GridViewRow objects in a GridView control.

Note: This collection cannot be enumerated in the current release.


GridViewRow Object

Description

Represents an individual row in a GridView control.


Menu.MenuItems Property

Description

Gets a value indicating the collection of MenuItem objects associated with the menu.

Syntax

object.MenuItems


Style Property (MessageBox Object)

Description

Gets or sets the style of the MessageBox.

Syntax

$MessageBox.Style [ = Number ]

Values

A numeric value that is the combination of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. Valid values are as follows:

Buttons:

Value | Member | Description
0 | OK | Displays OK button.
1 | OKCancel | Displays OK and Cancel buttons.
2 | AbortRetryIgnore | Displays Abort, Retry, and Ignore buttons.
3 | YesNoCancel | Displays Yes, No, and Cancel buttons.
4 | YesNo | Displays Yes and No buttons.
5 | RetryCancel | Displays Retry and Cancel buttons.

Icons:

Value | Member | Description
16 | Critical | Displays Critical Message icon.
32 | Question | Displays Warning Query icon.
48 | Exclamation | Displays Warning Message icon.
64 | Information | Displays Information Message icon.

Default Button:

Value | Member | Description
0 | DefaultButton1 | First button is default.
256 | DefaultButton2 | Second button is default.
512 | DefaultButton3 | Third button is default.

Modality:

Value | Member | Description
0 | ApplicationModal | Application is modal. The user must respond to the message box before continuing work in the current application.
4096 | SystemModal | System is modal. All applications are suspended until the user responds to the message box.


Value Property

Description

ProgressBar: Gets or sets the current position of the progress bar.

Syntax

$Object.Value = Number

Values

The current numeric value of the control.

Remarks

The minimum and maximum values of the Value property are specified by the Minimum and Maximum properties. This property enables you to increment or decrement the value of the progress bar directly. To perform consistent increases in the value of the ProgressBar control you can use the Step property with the PerformStep method. To increase the progress bar value by varying amounts, use the Increment method.