Chapter 12

Form Element Controls


CONTENTS

One of the basic building blocks of a good graphical user interface (GUI) is a basic control like the CheckBox and Text Box. This chapter concentrates on general controls that are useful to build forms and other GUI elements. For each control, you will follow the usual format. First, you will learn about the control and discover where you can get it. Then you will learn the properties, events, and methods available for use with the control.

NOTE
A lot of the Microsoft Forms controls discussed in this chapter are as Microsoft implements the HTML forms. When Internet Explorer encounters an <INPUT TYPE=CHECKBOX> tag in an HTML document, for example, it calls its CheckBox control to implement it. Therefore, it is not necessary for you to implement HTML form elements by directly accessing the controls, since you can achieve the same thing using standard HTML 3.2.
However, there are instances where you want to use the controls directly. Other reasons are to put form elements into an HTML layout or to use the control to achieve a special effect in these controls that is not possible when using it through standard HTML.

Cal32

This is a flexible control to implement the display of a calendar in your Web pages. It also has buttons to go to next or previous months and years. You can control the display of the buttons, colors, and more, either during design time or from a script. If your Web pages require the display and manipulation of dates, you should take a good look at this control.

Source

Vendor Information:

DameWare Development
http://atlantis.ni-inc.com/~dameware/
Figure 12.1 : Cal32

Properties

Table 12.1  Control Properties

PropertyDescription
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
CodeBaseThe origin of the control including URL, file type, and version number
ContextMenuTrue, to allow context menu
DateThe date value to be displayed
DateCaptionTrue, to enable caption for the dates
DateCaptionColorColor of the date caption
DateCaptionFontThe font of the date caption
DateCaptionFormatThe format for the date caption
DateStringFormatFormat string for the date caption
DayFontFont for the day text
DaysOfWeekFontFont for the days of week text
DaysOfWeekTextTrue, to display weekday names
DaysOfWeekTextColorColor of the weekday names text
DayTextColorColor of the day text
Draw3DTrue, to display a 3-D effect
FocusIndicatorTrue, to display focus indicator
GridStyleTrue, to display the grid
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MonthYearButtonsTrue, to display the Next Month and Next Year buttons
OffsetTextCaptionTrue, to give the caption a 3-D look
OffsetTextColorColor for the offset (3-D) portion of the caption
OffsetTextDaysTrue, to offset the number days text, giving them a 3-D look
OffsetTextWeekdaysTrue, to offset the weekdays text, giving them a 3-D look
SelectedDayTextColorColor of the selected day
SingleCharacterDayTrue, to display days in single characters
StringDateThe date in string format
TabIndexThe object's tab order position in the HTML layout
ToolTipsTrue, to display the tool tips
TopThe distance between the top edge of the control and the top edge of the HTML layout
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

Table 12.2  Control Methods

MethodDescription
GetDateStringRetrieves the focused date in string format
GetDateAsFormatRetrieves the focused date as per format string
GetDateAsDateRetrieves the focused date as a variable of type DATE
SetCaptionDateFormatSets the caption format
SetDateAsDateSets focus on a date from a variable of type DATE
SetDateFormatSets focus on a date from a variable with a date format
SetDateStringSets focus on a date from a variable of type string

Events

Table 12.3  Control Events

EventDescription
ClickTriggers when a control is clicked with the mouse
DateChangedTriggers when the focus changes from one date to another
DateStringChangedTriggers when the StringDate property changes
DblClickTriggers when a control is double-clicked with the mouse
KeyDownTriggers when a user presses a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when the user moves the mouse
ShiftClickTriggers when the mouse is clicked while the user presses the Shift key

Example


<OBJECT ID="Cal321" WIDTH=160 HEIGHT=140

 CLASSID="CLSID:891C9A24-4070-11CF-8E46-00AA006DB209">

    <PARAM NAME="_Version" VALUE="65536">

    <PARAM NAME="_ExtentX" VALUE="3387">

    <PARAM NAME="_ExtentY" VALUE="2963">

    <PARAM NAME="_StockProps" VALUE="33">

    <PARAM NAME="BackColor" VALUE="12632256">

    <PARAM NAME="BorderStyle" VALUE="1">

</OBJECT>

CheckBox Control

The Microsoft Forms 2.0 CheckBox control implements the check box GUI element. A check box is a three-state (yes/no/null) control with a gray mark for null, blank for no, and a cross mark for yes. This control is used for selecting inclusive options. You can select more than one.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.2 : CheckBox control

Properties

Table 12.4  Control Properties

PropertyDescription
AcceleratorThe accelerator key
AlignmentAlignment of the caption text
AutoSizeAutomatically resize the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
CaptionThe object heading text displayed
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe font for the options text; the font has the following properties: Bold, Charset, Italic, Name, Size, StrikeThrough, Underline, and Weight
ForeColorForeground color of the object
GroupNameThe group name for the option button
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
LockedTrue, to disallow editing through the UI
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to display
PicturePositionThe location of the picture with respect to its caption
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
TripleStateTrue, for the control to have three states (yes, no, null)
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the lines to fit the width of the control

Method

Any change in the properties will be displayed immediately.

Events

Table 12.5  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes, either by the UI or from the script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse; also triggers when the user selects a value in a multi-value control, such as the list box
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control or navigation or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when the user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="CheckBox1" WIDTH=128 HEIGHT=30

 CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="4">

    <PARAM NAME="Size" VALUE="2709;635">

    <PARAM NAME="Value" VALUE="True">

    <PARAM NAME="Caption" VALUE="Option 1">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="CheckBox2" WIDTH=128 HEIGHT=30

 CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="4">

    <PARAM NAME="Size" VALUE="2709;635">

    <PARAM NAME="Value" VALUE="False">

    <PARAM NAME="Caption" VALUE="Option 2">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="CheckBox3" WIDTH=128 HEIGHT=30

 CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="4">

    <PARAM NAME="Size" VALUE="2709;635">

    <PARAM NAME="Caption" VALUE="Option 3">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

Combo Box Control

The Microsoft Forms 2.0 Combo Box implements a selectable list with capability for adding items by the user. A list of items is displayed for the user, and he or she can choose one or more values from the list. The user can add a value to the list and select that item.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.3 : Combo Box control

Properties

Table 12.6  Control Properties

PropertyDescription
AutoSizeAutomatically resizes the object to fit the contents
AutoTabFocus moves to the next control once the maximum input size is reached
AutoWordSelectSpecifies either word or character as the unit of selection
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
BorderColorThe object's border color
BorderStyleThe object's border style-none or single
BoundColumn The stored data column for a multicolumn combo box
CodeBaseThe origin of the control, including URL, file type, and version number
ColumnAssigns or gets an item from a column
ColumnCountThe number of columns that appear
ColumnHeadsTrue, to display one row of column heading
ColumnWidthsSets the column widths
CurTargetXThe x-coordinate of the insertion point relative to the left edge of the control
CurXThe x-coordinate of the insertion point relative to the left edge of the control
DragBehaviorTrue, to enable drag-and-drop actions
DropButtonStyleThe symbol for the drop button-plain, arrow, ellipsis, or reduce
EnabledTrue, to set the control to get focus and respond to UI
FontThe font of the text items
ForeColorForeground color of the object
HeightThe vertical height of the object
HideSelectionTrue, to keep the text highlight, even when the control loses focus
IDName of the object or control
IMEModeRuntime mode of the Input Method Editor (left to right or right to left); only for the Far East languages
LeftThe distance between the left edge of the control and the left edge of the HTML layout
ListIndexThe index of the currently selected item
ListRowsThe rows to be displayed
ListStyleThe list box style (plain or option)
ListWidthThe width of the list box
LockedTrue, to disallow editing through the UI
MatchEntryThe way to match an entry (by first letter, when entry is complete, and so on)
MatchRequiredTrue, to require a match before the user leaves the field
MaxLengthThe maximum number of characters a user can enter into the field
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
SelectionMarginTrue, to allow the user to select by clicking the left margin region
ShowDropButtonWhenThe situations when the drop button will appear (never, always, focus-when the control has focus)
SpecialEffectThe visual appearance of the control (raised, sunken, flat, etched, bump)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TextThe string in the control
TextAlignThe alignment of the string information in the control
TextColumnThe column to be displayed for the user
TopThe distance between the top edge of the control and the top edge of the HTML layout
TopIndexThe first item displayed in the list
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

Table 12.7  Control Methods

MethodDescription
AddItemAdds an item to the list
ClearDeletes the contents of an object or collection
CopyCopies the selected item text to the clipboard
CutMoves the selected item text to the clipboard
DropdownToggles the display of the list portion
PasteCopies the contents of the clipboard to the object
RemoveItemRemoves an item from the list

Events

Table 12.8  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from a script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse; also triggers when the user selects a value in a multi-value control, such as the list box
DblClickTriggers when a control is double-clicked with the mouse
DropButtonClickTriggers when the drop-down button is clicked
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control or navigation or function key
MouseDownTriggers when a user presses a mouse button
MouseUpTriggers when a user releases a mouse button

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <OBJECT ID="ComboBox1" WIDTH=120 HEIGHT=30

 CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="VariousPropertyBits" VALUE="746604571">

    <PARAM NAME="DisplayStyle" VALUE="3">

    <PARAM NAME="Size" VALUE="2540;635">

    <PARAM NAME="MatchEntry" VALUE="1">

    <PARAM NAME="ShowDropButtonWhen" VALUE="2">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

    <SCRIPT LANGUAGE="VBScript">

<!--

Sub cmdAddComboBoxItem_Click()

ComboBox1.AddItem("Another Item")

end sub

-->

    </SCRIPT>

    <OBJECT ID="cmdAddComboBoxItem" WIDTH=120 HEIGHT=40

     CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57">

        <PARAM NAME="Caption" VALUE="Add Item">

        <PARAM NAME="Size" VALUE="2540;847">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

        <PARAM NAME="ParagraphAlign" VALUE="3">

    </OBJECT>

</BODY>

</HTML>

NOTE
The Add Item button shown in this example is not part of the Combo Box control. The combo box is a combination of text box and list box.

Command Button Control

As the name implies, the Microsoft Forms 2.0 Command Button gives the Web developers the capability to embed a button in the Web pages.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.4 : Command Button control

Properties

Table 12.9  Control Properties

PropertyDescription
AcceleratorThe accelerator key
AutoSizeAutomatically resize the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
CaptionThe object heading text that appears
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe font of the button text
ForeColorForeground color of the object
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
LockedTrue, to disallow editing through the UI
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PicturePositionThe location of the picture with respect to its caption
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TakeFocusOnClickTrue, to get focus to this control when clicked
TopThe distance between the top edge of the control and the top edge of the HTML layout
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the button caption to fit the width of the control

Methods

There are no methods for this control.

Events

Table 12.10  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control or navigation or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control or navigation or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="CommandButton1" WIDTH=120 HEIGHT=40

 CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57">

    <PARAM NAME="Caption" VALUE="Command Button">

    <PARAM NAME="Size" VALUE="2540;846">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

    <PARAM NAME="ParagraphAlign" VALUE="3">

</OBJECT>

Frame Control

The Microsoft Forms 2.0 Frame control displays a 3-D frame on the Web page. This control can be used to enhance the look of a group of controls-a group of option buttons or check boxes, for example. You can also use it to capture events when a user moves into the frame. Another important use of the frame control is to isolate groups of option buttons. Only one of a set of option buttons can be selected. By placing sets within frames, each separate set can have one option chosen.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.5 : Frame control

Properties

Table 12.11  Control Properties

PropertyDescription
ActiveControlThe control that is active in this frame.
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
BorderColorThe object's border color
BorderStyleThe object's border style
CaptionThe object heading text displayed
CodeBaseThe origin of the control, including URL, file type, and version number
CycleAllForms or the CurrentForm
EnabledTrue, to set the control to get focus and respond to UI
FontThe caption font
ForeColorForeground color of the object
IDName of the object or control
KeepScrollBarsVisibleThe type of scroll bar that appears (none, horizontal, vertical, or both)
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PictureAlignmentThe alignment of the background picture
PictureSizeModeThe size of the background image-clip, stretch (enlarge to fit the size), crop, and so on
PictureTilingTrue, to tile the image
ScrollBarsThe type (vertical or horizontal or both) of scroll bars displayed
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
VerticalScrollBarSideThe side to display the vertical scroll bar (right or left)
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

Table 12.12  Control Methods

MethodDescription
CopyCopies the object contents to the clipboard
CutMoves the object contents to the clipboard
PasteCopies the contents of the clipboard to the object
RedoActionPerforms the undone action
RemoveItemRemoves an item from the list
RepaintDisplays the frame area again
UndoActionReverts to the state before the current action

Events

Table 12.13  Control Events

EventDescription
AddControlTriggers after a control is added into this frame
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ClickTriggers when a control is clicked with the mouse; also triggers when the user selects a value in a multi-value control, such as the list box
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control or navigation or function key
MouseDownTriggers when a user presses a mouse button
MouseUpTriggers when a user releases a mouse button
RemoveControlTriggers when a control is removed from inside the frame
ScrollTriggers when the scroll bar is moved
ZoomTriggers when the control is zoomed

Example


<OBJECT ID="Frame1" WIDTH=360 HEIGHT=240

 CLASSID="CLSID:6E182020-f460-11CE-9BCD-00AA00608E01">

</OBJECT>

Hotspot Control

The Microsoft Forms 2.0 Hotspot control implements a region (usually transparent) in the Web page to respond to events. You can make a hotspot control over an image to get a navigator type of user interface. This control has a variety of uses.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
NOTE
This is a backend control that works behind the scenes without any direct user interface. The control does not have any visible output as it is invisible at runtime.

Properties

Table 12.14  Control Properties

PropertyDescription
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

There are no methods for this control.

Events

Table 12.15  Control Events

EventDescription
AfterUpdateTriggers following the data being updated in a control through the UI
BeforeDragOverTriggers when a dragged object has reached the drop target
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
EnterTiggers just before a control gets focus; similar to GotFocus event
ExitTriggers just before a control loses the focus; similar to LostFocus event
MouseDownTriggers when a user presses a mouse button
MouseEnterTriggers when the mouse pointer moves into the display area occupied by a control
MouseExitTriggers when the mouse pointer moves out of the display area occupied by a control
MouseMoveTriggers when the user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="HotSpot1"

     CLASSID="CLSID:2B32FBC2-A8f1-11CF-93EE-00AA00C08FDF" STYLE="TOP:70pt;LEFT:226pt

	                                ;WIDTH:203pt;HEIGHT:117pt;ZINDEX:0;">

        <PARAM NAME="VariousPropertyBits" VALUE="8388627">

        <PARAM NAME="Size" VALUE="7154;4127">

    </OBJECT>

Notes

The HotSpot Control can be added only to an HTML layout.

HTML Layout

The HTML Layout control is one ActiveX control that allows other ActiveX controls to be placed in a layout and be positioned precisely with respect to one another. It also allows other controls (which can include text and graphics through the Label and Image controls) to be layered and overlapped. And, while the most convenient way to create an HTML layout is through the ActiveX Control Pad, it is possible to create one otherwise.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.6 : HTML Layout control

Properties

Table 12.16  Control Properties

PropertyDescription
BackColorBackground color of the object
DrawBufferBuffer for off-screen rendering of an HTML Layout
HeightThe vertical height of the object
IDName of the object or control
WidthThe width of the control in points

Methods

There are no methods for this control.

Event

Table 12.17  Control Event

EventDescription
OnLoadTriggers after an HTML layout is created

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

<OBJECT CLASSID="CLSID:812AE312-8B8E-11CF-93C8-00AA00C08FDF"

ID="Layout1_alx" STYLE="LEFT:0;TOP:0">

<PARAM NAME="ALXPATH" REF VALUE="file:A:\Layout1.alx">

 </OBJECT>

</BODY>

</HTML>

The file LAYOUT1.ALX has the following contents:


<DIV ID="Layout1" STYLE="LAYOUT:FIXED;WIDTH:454pt;HEIGHT:262pt;">

    <OBJECT ID="HotSpot1"

     CLASSID="CLSID:2B32FBC2-A8f1-11CF-93EE-00AA00C08FDF" STYLE="TOP:156pt;

	                                  LEFT:86pt;WIDTH:86pt;HEIGHT:70pt;ZINDEX:0;">

        <PARAM NAME="VariousPropertyBits" VALUE="8388627">

        <PARAM NAME="Size" VALUE="3034;2469">

    </OBJECT>

    <OBJECT ID="WebBrowser1"

     CLASSID="CLSID:EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B" STYLE="TOP:234pt;LEFT:234pt

	                                       ;WIDTH:289pt;HEIGHT:117pt;ZINDEX:1;">

        <PARAM NAME="Height" VALUE="132">

        <PARAM NAME="Width" VALUE="316">

        <PARAM NAME="AutoSize" VALUE="0">

        <PARAM NAME="ViewMode" VALUE="1">

        <PARAM NAME="AutoSizePercentage" VALUE="0">

        <PARAM NAME="AutoArrange" VALUE="1">

        <PARAM NAME="NoClientEdge" VALUE="1">

        <PARAM NAME="AlignLeft" VALUE="0">

    </OBJECT>

    <OBJECT ID="CheckBox1"

     CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3" STYLE="TOP:47pt;

	                       LEFT:211pt;WIDTH:108pt;HEIGHT:18pt;TABINDEX:2;ZINDEX:2;">

        <PARAM NAME="BackColor" VALUE="2147483663">

        <PARAM NAME="ForeColor" VALUE="2147483666">

        <PARAM NAME="DisplayStyle" VALUE="4">

        <PARAM NAME="Size" VALUE="3810;635">

        <PARAM NAME="Caption" VALUE="CheckBox1">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

    </OBJECT>

    <OBJECT ID="CheckBox2"

     CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3" STYLE="TOP:78pt;

	                        LEFT:211pt;WIDTH:109pt;HEIGHT:23pt;TABINDEX:3;ZINDEX:3;">

        <PARAM NAME="BackColor" VALUE="2147483663">

        <PARAM NAME="ForeColor" VALUE="2147483666">

        <PARAM NAME="DisplayStyle" VALUE="4">

        <PARAM NAME="Size" VALUE="3845;811">

        <PARAM NAME="Caption" VALUE="CheckBox2">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

    </OBJECT>

    <OBJECT ID="CheckBox3"

     CLASSID="CLSID:8BD21D40-EC42-11CE-9E0D-00AA006002f3" STYLE="TOP:117pt;

	                      LEFT:211pt;WIDTH:109pt;HEIGHT:23pt;TABINDEX:4;ZINDEX:4;">

        <PARAM NAME="BackColor" VALUE="2147483663">

        <PARAM NAME="ForeColor" VALUE="2147483666">

        <PARAM NAME="DisplayStyle" VALUE="4">

        <PARAM NAME="Size" VALUE="3845;811">

        <PARAM NAME="Caption" VALUE="CheckBox3">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

    </OBJECT>

    <OBJECT ID="Image1"

     CLASSID="CLSID:D4A97620-8E8F-11CF-93CD-00AA00C08FDF" STYLE="TOP:156pt;

	                      LEFT:70pt;WIDTH:172pt;HEIGHT:70pt;ZINDEX:5;">

        <PARAM NAME="BorderStyle" VALUE="0">

        <PARAM NAME="SizeMode" VALUE="3">

        <PARAM NAME="Size" VALUE="6068;2469">

        <PARAM NAME="PictureAlignment" VALUE="0">

        <PARAM NAME="VariousPropertyBits" VALUE="19">

    </OBJECT>

</DIV>

Image Control

The Microsoft Forms 2.0 Image control can be used to display an image on the Web page. It supports various graphic formats including GIF (87 and 89), JPEG, WMF, and BMP.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.7 : Image control

Properties

Table 12.18  Control Properties

PropertyDescription
AutoSizeAutomatically resizes the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
BorderColorThe object's border color
BorderStyleThe object's border style
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PictureAlignmentThe alignment of the background picture
PicturePathThe URL from where the picture should be loaded
PictureSizeModeThe size of the background image
PictureTilingTrue, to tile the image
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TopThe distance between the top edge of the control and the top edge of the HTML layout
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

There are no methods for this control.

Events

Table 12.19  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when the user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="Image1" WIDTH=120 HEIGHT=120

     CLASSID="CLSID:4C599241-6926-101B-9992-00000B65C6f9">

        <PARAM NAME="Size" VALUE="2540;2540">

        <PARAM NAME="PicturePath" VALUE="a:\client.gif">

    </OBJECT>

Label Control

The Microsoft Forms 2.0 Label control displays a text on a Web page. The Label control gives you a lot of flexibility in font, size, color, and scripting. You can change the displayed text dynamically.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.8 : Label control

Properties

Table 12.20  Control Properties

PropertyDescription
AcceleratorThe accelerator key
AutoSizeAutomatically resizes the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
BorderColorThe object's border color
BorderStyleThe object's border style
CaptionThe label text displayed
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe text font
ForeColorForeground color of the object
IDName of the control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PicturePositionThe location of the picture
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TextAlignThe alignment of the string information in the control
TopThe distance between the top edge of the control and the top edge of the HTML layout
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the lines to fit the width of the control

Methods

There are no methods for this control.

Events

Table 12.21  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ClickTriggers when a control is clicked with the mouse; also triggers when the user selects a value in a multi-value control, such as the list box
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="Label1" WIDTH=120 HEIGHT=30

CLASSID="CLSID:978C9E23-D4B0-11CE-Bf2D-00AA003f40D0">

    <PARAM NAME="Caption" VALUE="Test Label">

    <PARAM NAME="Size" VALUE="2540;635">

    <PARAM NAME="BorderStyle" VALUE="1">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

ListBox Control

The Microsoft Forms 2.0 ListBox control implements the list box GUI capabilities in an ActiveX control. A list of items appears from which the user can choose one or more values.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.9 : ListBox control

Properties

Table 12.22  Control Properties

PropertyDescription
BackColorBackground color of the object
BorderColorThe object's border color
BorderStyleThe object's border style
BoundColumn The stored data column for a multicolumn list box
CodeBaseThe origin of the control, including URL, file type, and version number
ColumnAn item in a column
ColumnCountThe number of columns to be displayed
ColumnHeadsTrue, to display one row of column heading
ColumnWidthsThe column widths
EnabledTrue, to set the control to get focus and respond to UI
FontThe font of the list items text
ForeColorForeground color of the object
HeightThe vertical height of the object
IDName of the object or control
IMEModeRuntime mode of the Input Method Editor (left to right or right to left); only for the Far East languages
IntegralHeightTrue, to fully display the item by resizing the control height
LeftThe distance between the left edge of the control and the left edge of the HTML layout
ListA value of an entry in the list box
ListIndexThe index of the currently selected item
ListStyleThe list box style
LockedTrue, to disallow editing through the UI
MatchEntryThe way to match an entry (by first letter, when entry is complete, and so on)
MatchFoundTrue, indicates a match is found between the entry and the contents
MatchRequiredTrue, to require a match before the user leaves the field
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
MultiSelectTrue, to allow the user to select more than one item
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TextThe value selected in the control
TextColumnThe column to be displayed for the user
TopThe distance between the top edge of the control and the top edge of the HTML layout
TopIndexThe first item displayed in the list
ValueThe content of the selected item in the control object
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

Table 12.23  Control Methods

MethodDescription
AddItemFor a single-column list box or combo box, adds an item to the list; for a multicolumn list box or combo box, adds a row to the list.
ClearRemoves all entries in the list
RemoveItemRemoves an item from the list

Events

Table 12.24  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse; also triggers when the user selects a value in a multi-value control, such as the list box
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when the user moves the mouse
MouseUpTriggers when a user releases a mouse button

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <OBJECT ID="ListBox1" WIDTH=165 HEIGHT=55

 CLASSID="CLSID:8BD21D20-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="ScrollBars" VALUE="3">

    <PARAM NAME="DisplayStyle" VALUE="2">

    <PARAM NAME="Size" VALUE="3492;1166">

    <PARAM NAME="MatchEntry" VALUE="0">

    <PARAM NAME="ListStyle" VALUE="1">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

    <SCRIPT LANGUAGE="VBScript">

<!--

Sub cmdAddItem_Click()

     ListBox1.AddItem "List Box Item"

end sub

-->

    </SCRIPT>

    <OBJECT ID="cmdAddItem" WIDTH=200 HEIGHT=40

     CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57">

        <PARAM NAME="Caption" VALUE="Add Item To List Box">

        <PARAM NAME="Size" VALUE="4239;846">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

        <PARAM NAME="ParagraphAlign" VALUE="3">

    </OBJECT>

</BODY>

</HTML>

Option Button

The Microsoft Forms 2.0 Option Button implements the single choice, multi-value option GUI. The user can select only one of the groups of options displayed.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.10 : Option Button control

Properties

Table 12.25  Control Properties

PropertyDescription
AcceleratorThe accelerator key
AlignmentAlignment of the caption text
AutoSizeAutomatically resizes the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
CaptionThe object heading text displayed
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe caption font
ForeColorForeground color of the object
GroupNameThe group name for the option button
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
LockedTrue, to disallow editing through the UI
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PicturePositionThe location of the picture with respect to its caption
SpecialEffectThe visual appearance of the control (flat, border, highlight, and so on)
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
TripleStateTrue, for the button to have three states (Yes, No, Null)
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the lines to fit the width of the control

Methods

This control has no methods.

Events

Table 12.26  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

<OBJECT ID="OptionButton1" WIDTH=180 HEIGHT=30

 CLASSID="CLSID:8BD21D50-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="5">

    <PARAM NAME="Size" VALUE="3810;635">

    <PARAM NAME="Caption" VALUE="Option #1">

    <PARAM NAME="GroupName" VALUE="Group1">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="OptionButton2" WIDTH=180 HEIGHT=30

 CLASSID="CLSID:8BD21D50-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="5">

    <PARAM NAME="Size" VALUE="3810;635">

    <PARAM NAME="Caption" VALUE="Option #2">

    <PARAM NAME="GroupName" VALUE="Group1">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="OptionButton3" WIDTH=180 HEIGHT=30

 CLASSID="CLSID:8BD21D50-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="5">

    <PARAM NAME="Size" VALUE="3810;635">

    <PARAM NAME="Caption" VALUE="Option #3">

    <PARAM NAME="GroupName" VALUE="Group1">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="OptionButton4" WIDTH=180 HEIGHT=30

 CLASSID="CLSID:8BD21D50-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="5">

    <PARAM NAME="Size" VALUE="3810;635">

    <PARAM NAME="Caption" VALUE="Option X">

    <PARAM NAME="GroupName" VALUE="Group2">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

<OBJECT ID="OptionButton5" WIDTH=180 HEIGHT=30

 CLASSID="CLSID:8BD21D50-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="5">

    <PARAM NAME="Size" VALUE="3810;635">

    <PARAM NAME="Caption" VALUE="Option Y">

    <PARAM NAME="GroupName" VALUE="Group2">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

</BODY>

</HTML>

Scroll Bar

The Microsoft Forms 2.0 Scroll Bar implements a way to increase or decrease the value of another control. The user uses the scroll bar to indicate an increase or decrease.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.11 : Scroll Bar control

Properties

Table 12.27  Control Properties

PropertyDescription
BackColorBackground color of the object
CodeBaseThe origin of the control, including URL, file type, and version number
DelayThe amount of time between two activation events
EnabledTrue, to set the control to get focus and respond to UI
ForeColorForeground color of the object
HeightThe vertical height of the object
IDName of the object or control
LargeChangeThe value for the large delta effect when a user clicks between the scroll box and arrow
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MaxThe upper limit
MinThe lower limit
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
OrientationThe orientation (horizontal or vertical)
ProportionalThumbTrue, to set the scroll box thumb size proportional to the size of the visible portion
SmallChangeThe value for the small delta effect when a user clicks between the scroll box and arrow
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
ValueThe content of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

This control has no methods.

Events

Table 12.28  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
ScrollTriggers when the scroll bar is moved

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <SCRIPT LANGUAGE="VBScript">

<!--

Sub ScrollBar1_Change()

     Label1.Caption = "         The Current Value is " & ScrollBar1.Value

end sub

-->

    </SCRIPT>

    <OBJECT ID="ScrollBar1" WIDTH=135 HEIGHT=23

 CLASSID="CLSID:DFD181E0-5E2F-11CE-A449-00AA004A803D">

    <PARAM NAME="Size" VALUE="2858;494">

    <PARAM NAME="Max" VALUE="10">

</OBJECT>

    <OBJECT ID="Label1" WIDTH=368 HEIGHT=30

 CLASSID="CLSID:978C9E23-D4B0-11CE-Bf2D-00AA003f40D0">

    <PARAM NAME="Caption" VALUE="0">

    <PARAM NAME="Size" VALUE="7816;635">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

</BODY>

</HTML>

Spin Button

The Microsoft Forms 2.0 Spin Button is another control (like the Scroll Bar) that increments/decrements the values of other controls. This also gives the user a user-friendly way to change values-numbers, date values, day, month, and so on.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.12 : Spin Button control

Properties

Table 12.29  Control Properties

PropertyDescription
BackColorBackground color of the object
CodeBaseThe origin of the control, including URL, file type, and version number
DelayThe amount of time between two activation events
EnabledTrue, to set the control to get focus and respond to UI
ForeColorForeground color of the object
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MaxThe upper limit
MinThe lower limit
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
OrientationThe orientation (horizontal or vertical)
SmallChangeThe increment/decrement value when the user clicks the scroll arrow
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

The control has no methods.

Events

Table 12.30  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
SpinDownTriggers when the user clicks the spin button arrow to decrease the value (usually the left or the down arrow for horizontal or vertical orientation)
SpinUpTriggers when the user clicks the spin button arrow to increase the value (usually the right or up arrow for horizontal or vertical orientation)

Examples


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <OBJECT ID="Label1" WIDTH=57 HEIGHT=30

     CLASSID="CLSID:978C9E23-D4B0-11CE-Bf2D-00AA003f40D0">

        <PARAM NAME="Caption" VALUE="100">

        <PARAM NAME="Size" VALUE="1199;635">

        <PARAM NAME="FontName" VALUE="Fixedsys">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

    </OBJECT>

    <SCRIPT LANGUAGE="VBScript">

<!--

Sub SpinButton1_SpinDown()

     Label2.Caption="Spin Down"

end sub

Sub SpinButton1_SpinUp()

     Label2.Caption="Spin Up"

end sub

Sub SpinButton1_Change()

     Label1.Caption=SpinButton1.Value

end sub

-->

    </SCRIPT>

    <OBJECT ID="SpinButton1" WIDTH=17 HEIGHT=32

     CLASSID="CLSID:79176FB0-B7f2-11CE-97EF-00AA006D2776">

        <PARAM NAME="Size" VALUE="353;670">

        <PARAM NAME="Min" VALUE="100">

        <PARAM NAME="Max" VALUE="1000">

        <PARAM NAME="Position" VALUE="100">

    </OBJECT>

    <OBJECT ID="Label2" WIDTH=265 HEIGHT=30

     CLASSID="CLSID:978C9E23-D4B0-11CE-Bf2D-00AA003f40D0">

        <PARAM NAME="Size" VALUE="5615;635">

        <PARAM NAME="FontEffects" VALUE="1073741826">

        <PARAM NAME="FontHeight" VALUE="200">

        <PARAM NAME="FontCharSet" VALUE="0">

        <PARAM NAME="FontPitchAndFamily" VALUE="2">

    </OBJECT>

</BODY>

</HTML>

TabStrip

The Microsoft Forms 2.0 TabStrip control implements a folder GUI in an ActiveX control. The folder concept is very useful when you want to use a lot of controls in your forms. The tab folders in the TabStrip control make it easier to group the controls and put them in many tab strip pages.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.13 : TabStrip control

Properties

Table 12.31  Control Properties

PropertyDescription
BackColorBackground color of the object
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe font for the tab captions
ForeColorForeground color of the object
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
MultiRowTrue, to set the control to have more than one tab stop
StyleThe tab style-tabs, buttons, and so on
TabFixedHeightThe height of the tab, in points
TabFixedWidth The width of the tab, in points
TabIndexThe object's tab order position in the HTML layout
TabOrientationThe location of the tab-top, bottom, left, right, and so on
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points

Methods

This control has no methods.

Events

Table 12.32  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<HTML>

<HEAD>

<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <OBJECT ID="TabStrip1" WIDTH=368 HEIGHT=227

 CLASSID="CLSID:EAE50EB0-4A62-11CE-BED6-00AA00611080">

    <PARAM NAME="ListIndex" VALUE="0">

    <PARAM NAME="Size" VALUE="7796;4798">

    <PARAM NAME="Items" VALUE="Tab1;Tab2;">

    <PARAM NAME="MultiRow" VALUE="-1">

    <PARAM NAME="TipStrings" VALUE=";;">

    <PARAM NAME="Names" VALUE="Tab1;Tab2;">

    <PARAM NAME="NewVersion" VALUE="-1">

    <PARAM NAME="TabsAllocated" VALUE="2">

    <PARAM NAME="Tags" VALUE=";;">

    <PARAM NAME="TabData" VALUE="2">

    <PARAM NAME="Accelerator" VALUE=";;">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

    <PARAM NAME="TabState" VALUE="3;3">

</OBJECT>

</BODY>

</HTML>

TextBox Control

The TextBox is a general purpose input ActiveX control. The user can type values into a text box.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.14 : TextBox control

Properties

Table 12.33  Control Properties

PropertyDescription
AutoSizeAutomatically resizes the object to fit the contents
AutoTabFocus moves to the next control once the maximum input size is reached
AutoWordSelectSpecifies either a word or character as the unit of selection
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
BorderColorThe object's border color
BorderStyleThe object's border style
CodeBaseThe origin of the control, including URL, file type, and version number
CurLineThe current line in a control, which contains the insertion point
CurTargetXThe x-coordinate of the insertion point relative to the left edge of the control
CurXThe x-coordinate of the insertion point relative to the left edge of the control
DragBehaviorTrue, to enable drag-and-drop operations
EnabledTrue, to set the control to get focus and respond to UI
EnterFieldBehaviorSelection behaviors when the field is entered
EnterKeyBehaviorThe effect of pressing the Enter key
FontThe font for the text
ForeColorForeground color of the object
HeightThe vertical height of the object
HideSelectionTrue, to keep the text highlighted even when the control loses focus
IDName of the object or control
IMEModeRuntime mode of the Input Method Editor (left to right or right to left); only for the Far East languages
IntegralHeightTrue, to fully display the item by resizing the control height
LeftThe distance between the left edge of the control and the left edge of the HTML layout
LockedTrue, to disallow editing through the UI
MaxLengthThe maximum number of characters a user can enter into the field
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
MultiLineTrue, to allow more than one line to appear
PasswordCharThe character mask displayed for the characters entered
ScrollBarsThe type (vertical/horizontal/both) of scroll bars displayed
SelectionMarginTrue, to allow the user to select by clicking the left margin region
SelLengthThe number of characters selected
SelStartThe starting/insertion point of selection
SelTextThe character string selected by the user
TabIndexThe object's tab order position in the HTML layout
TabKeyBehaviorTrue, to insert a tab character when the Tab key is pressed; false, to move focus to the next control in the tab order
TabStopTrue, to get focus when the user tabs through the controls
TextThe string in the control
TextAlignThe alignment of the text inside the control
TopThe distance between the top edge of the control and the top edge of the HTML layout
ValueThe content or state of the control object
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the lines to fit the width of the control

Methods

Table 12.34  Control Methods

MethodDescription
CopyCopies the selected text to the clipboard
CutMoves the selected text to the clipboard
PasteCopies the contents of the clipboard to the object

Events

Table 12.35  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
DblClickTriggers when a control is double-clicked with the mouse
DropButtonClickTriggers when the drop-down button is clicked
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Example


<OBJECT ID="TextBox1" WIDTH=213 HEIGHT=30

 CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="VariousPropertyBits" VALUE="746604571">

    <PARAM NAME="ScrollBars" VALUE="3">

    <PARAM NAME="Size" VALUE="4514;635">

    <PARAM NAME="SpecialEffect" VALUE="1">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

</OBJECT>

Toggle Button

The Toggle Button control is a two-state ActiveX button. This can be used to enhance the GUI for showing selected items, options, and the like.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/activex/gallery/
Figure 12.15 : Toggle Button control

Properties

Table 12.36  Control Properties

PropertyDescription
AcceleratorThe accelerator key
AutoSizeAutomatically resizes the object to fit the contents
BackColorBackground color of the object
BackStyleBackground style of the object-transparent, opaque, and so on
CaptionThe object heading text
CodeBaseThe origin of the control, including URL, file type, and version number
EnabledTrue, to set the control to get focus and respond to UI
FontThe font of the caption text
ForeColorForeground color of the object
GroupNameThe group the control belongs to
HeightThe vertical height of the object
IDName of the object or control
LeftThe distance between the left edge of the control and the left edge of the HTML layout
LockedTrue, to disallow editing through the UI
MouseIconThe image that appears when the mouse is moved over the object
MousePointerThe mouse pointer that appears when the mouse is moved over the object
PictureThe bitmap or icon to be displayed
PicturePositionThe location of the picture with respect to its caption
TabIndexThe object's tab order position in the HTML layout
TabStopTrue, to get focus when the user tabs through the controls
TopThe distance between the top edge of the control and the top edge of the HTML layout
TripleStateTrue, for the button to have three states (Yes, No, Null)
ValueThe content or state of the control object (True or False)
VisibleFalse, to hide the control
WidthThe width of the control in points
WordwrapTrue, to wrap the lines to fit the width of the control

Methods

This control has no methods.

Events

Table 12.37  Control Events

EventDescription
BeforeDragOverTriggers when a dragged object has reached the drop target
BeforeDropOrPasteTriggers when an object is about to be dropped or pasted into a control
ChangeTriggers when the value of a control changes either by the UI or from the script; use this event handler to synchronize data between controls
ClickTriggers when a control is clicked with the mouse
DblClickTriggers when a control is double-clicked with the mouse
ErrorTriggers when a control encounters an error
KeyDownTriggers when a user presses a control, navigation, or function key
KeyPressTriggers when a key is either pressed by the user or sent from a script by the SendKeys function
KeyUpTriggers when a user releases a control, navigation, or function key
MouseDownTriggers when a user presses a mouse button
MouseMoveTriggers when a user moves the mouse
MouseUpTriggers when a user releases a mouse button

Examples


<TITLE>New Page</TITLE>

</HEAD>

<BODY>

    <SCRIPT LANGUAGE="VBScript">

<!--

Sub ToggleButton1_Change()

     IF ToggleButton1.Value="True" THEN

          ToggleButton1.Caption="True/1/ON"

     ELSE

          ToggleButton1.Caption="False/0/OFF"

     end IF

end sub

Sub ToggleButton2_Change()

     IF ToggleButton2.Value="True" THEN

          ToggleButton2.Caption="True/1/ON"

     ELSE

          ToggleButton2.Caption="False/0/OFF"

     end IF

end sub

-->

    </SCRIPT>

    <OBJECT ID="ToggleButton1" WIDTH=177 HEIGHT=48

 CLASSID="CLSID:8BD21D60-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="6">

    <PARAM NAME="Size" VALUE="3725;1037">

    <PARAM NAME="Value" VALUE="True">

    <PARAM NAME="Caption" VALUE="On">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

    <PARAM NAME="ParagraphAlign" VALUE="3">

</OBJECT>

    <OBJECT ID="ToggleButton2" WIDTH=205 HEIGHT=48

 CLASSID="CLSID:8BD21D60-EC42-11CE-9E0D-00AA006002f3">

    <PARAM NAME="BackColor" VALUE="2147483663">

    <PARAM NAME="ForeColor" VALUE="2147483666">

    <PARAM NAME="DisplayStyle" VALUE="6">

    <PARAM NAME="Size" VALUE="4339;1037">

    <PARAM NAME="Value" VALUE="False">

    <PARAM NAME="Caption" VALUE="OFF">

    <PARAM NAME="FontName" VALUE="Fixedsys">

    <PARAM NAME="FontCharSet" VALUE="0">

    <PARAM NAME="FontPitchAndFamily" VALUE="2">

    <PARAM NAME="ParagraphAlign" VALUE="3">

</OBJECT>

</BODY>

</HTML>