Aware/VBX

Properties

Events

Features

Custom Controls

C++ Usage


Features

Retrieving Version Information

Setting Borders

Data Aware Issues

OnFocus Features

Setting Margins

Redrawing and Optimization

Setting a 3-D Appearance

Setting 3-D Text

Button Behavior

International Settings

Insert and Overwrite Features

Handling Invalid Data

Null Values

User Access to Data

Numeric Controls


Retrieving Version Information

Setting Borders

Data Aware Issues

Overview

Binding through the Access Engine in Visual Basic

Data Retrieval for Specific Aware/VBX Controls

OnFocus Features

Overview

Visual OnFocus Cues

OnFocus Editing Features

Setting Margins

Redrawing and Optimization

Setting a 3-D Appearance

Components of the 3-D Look

3-D Styles

3-D Widths

Other Considerations

3-D for fpComboBox and fpListBox Controls

Setting 3-D Text

Aware/VBX Control

Button Behavior

Customizing Button Behavior

Default Button Behavior

Disabling Buttons

Hiding Buttons

International Settings

Aware/VBX Properties Using International Settings as Defaults

The WIN.INI File

Updating Aware Controls with New International Settings

Insert and Overwrite Features

Overview

Setting Caret Types

Handling Invalid Data

Editing Invalid Data

Clearing Invalid Data

Hiding Invalid Data

Targeting Invalid Data

Exceptions when Editing Invalid Data

Design Time Considerations

Determining the Status of Data in a Control

Null Values

Overview

Null Features

User Access to Data

Numeric Controls

Overview

General Numeric Features

Maximum and Minimum Values

Negative Format Settings

Negative Toggling

Separator Features

Retrieving Numeric Values

Floating Point Features

Decimal Places and Precision

Fixed Point Options

Leading Zeros


Retrieving Version Information

The About property displays a dialog box at design time or can be used to retrieve version information at run time.  The version number is displayed on the first line of text in the About box.  At run time, you can retrieve the version information as a string and then convert the string to a floating point number.  The format of the string is M.NN, where M represents the major version number as a one digit number from 0-9, and NN represents the minor version number as a two digit value from 00-99.


Setting Borders

Use the Aware/VBX border properties to customize the outline of each control.

Figure 2.1	Aware/VBX Border Styles

Consider the following when using the border properties:

1.    The BorderWidth property uses the pixel as its unit of measurement.

2.    Keep the BorderWidth to a minimum, i.e., a setting of 3 or less.  Larger settings can distract from the information within the control.

3.    When you set the BorderWidth property to 0, no border will be seen, no matter what the setting of the BorderStyle property.  Conversely, if the BorderStyle property is set to 0 (No border), no border is used, despite the setting of the BorderWidth property.

4.    When you want the control to appear to blend into its parent form, use the BorderStyle property setting = 0, and set the BackColor of the form and the BackColor of the control to the same color.

5.    Set the width of the border of the control before setting the height and width of the control to ensure the proper inner size of the control.  A controls overall height and width include the width of the border.

6.    When using a border around a control set with 3-D properties, use a small BorderWidth property setting.  A large border detracts from the 3-D effects created with the 3-D properties.

7.    The 3-D effect uses inside, outside, and frame width properties which may be set independently of the BorderWidth property.  See the section entitled Setting a 3-D Appearance later in this chapter for more information.


Data Aware Issues

Overview

Data aware controls provide access to specific data in a database.  All of the Aware/VBX controls are fully data aware and may be bound to the Visual Basic Data control for the retrieval and modification of data.  Aware/VBX can be bound to any database accessed by the Access Engine in Visual Basic.

Binding through the Access Engine in Visual Basic

Binding an Aware control to a database through Visual Basic requires these steps:

1.    Create the Visual Basic Data control on the same form as your Aware/VBX control:

Click the left mouse button on the Data Control icon on the Visual Basic Toolbar. Size the Data Control on the form containing your control.

2.    Associate, or link, the Data control and the Aware/VBX control at design time:

Use the DataSource property in the Aware/VBX control to designate the Data control by assigning the DataSource the name you gave the Data Control.

For example, the Data Control in Figure 2.2a below is named Database1.  Therefore, assign the data source by setting the DataSource property to Database1(Figure 2.2b).

Figure 2.2a	Bound fpText Control

Figure 2.2b	Setting the fpText Database Source

3.    Specify a valid field name using the DataField property in your Aware/VBX control.

After creating the association with the DataSource property, complete the connection to the database by providing the name of a valid Field object in the DataField property of the Aware/VBX control.

In Figure 2.2 above, the Data Control is bound to the BIBLIO.MDB database from Visual Basic.  The DataField property is assigned the valid field Author from the BIBLIO.MDB.

4.    Set the properties of the Visual Basic Data Control to retrieve specific data.

Note:  Binding your Aware/VBX control to the data control just opens the door to the database from which you want to retrieve and modify data.  For detailed information on using the Visual Basic Data Control refer to the Visual Basic Programmers Guide.

Data Retrieval for Specific Aware/VBX Controls

Both the control type and database field type determine how data is saved and/or retrieved.  Data can be handled differently for numeric controls than for an fpMask control or an fpText control because the controls support different data types.  You can set different field types within a control to customize data retrieval in your application.

The field types available to Aware/VBX controls are based on the field types supported by Visual Basic.  These field types are listed below:

Visual Basic Field Types

Text	Numeric	Other
Memo	Counter	Date/Time
String	Long	Boolean
	Currency	Binary
	Single
	Double
	Integer
Each Aware/VBX control uses specific field types based on the type of data the control supports.  The field types for individual Aware/VBX controls and special considerations for their use are as follows:

1.    fpText and fpMemo Controls

-     The fpText and fpMemo controls can be bound to any field type.  Visual Basics Data control will reject data that is not valid for the field type.

-     The fpText control can only accept strings that are less than 255 characters in length.

-     The fpMemo control is limited only by available memory.

-     Although the fpMemo control does not support virtual data management, it only reads the data necessary to fill the screen, allowing the user to read a database record containing a field with a large amount of text without waiting for all the data to be read.  Note, however, that any data not previously read must be read into memory before writing back to the data control.

2.    fpMask Control

-     The fpMask control can be bound to any field type.

-     Use the Mask property to enforce valid data entry for numeric field types; otherwise, the data control will reject invalid data.

-     The fpMask controls DataFormat property permits data to be written back to the database with or without mask literals.  This property can be used to save storage space and is particularly useful for saving formatted numeric data (such as a SSN) to numeric fields (such as Long).

3.    fpCurrency, fpDoubleSingle, and fpLongInteger Controls

-     The fpLongInteger, fpDoubleSingle and fpCurrency controls can be bound to Numeric and Text field types.

-     When used with Text fields, data read from the database which is not numeric causes the control to switch the UserEntry property to 0 (FreeFormat).  For more information refer to the section, Handling InvalidData later in this Chapter.

-     Data is always written to Text fields as unformatted data (see discussion on Text, UnfmtText, and Value properties later in this section).  Unformatted data is also used to write data to Numeric field types.

4.    fpDateTime Control

-     The fpDateTime control can be bound to Date/Time and Text field types.

-     When bound to text fields, invalid date and/or time data read from the database will cause the control to switch the UserEntry property to 0 (FreeFormat).  For more information refer to the section Handling InvalidData later in this Chapter.

-     Data is written to Text fields in the same format it uses for display.

-     When bound to Date/Time fields, only data accepted and displayed by the control is written back to the database.  Date or time data stored in the data field but not visible to the user remains unchanged.  By design, Date/Time fields can be bound to

1.    A single control that displays both the date and time, or

2.    Two separate controls: one that displays the date, the other the time.

5.    fpBoolean Control

-     The fpBoolean control can be bound to Text and Numeric field types.  How the control handles the data depends both on the field type and property settings:

fpBoolean Control Field Type and Property Specifications

Field Type	Property Settings	Read Value	Write Value
Text, Memo	The TextTrue property does not equal the empty string.	True if text read matches the TextTrue property string, Disabled if text read matches the TextDisabled property string, otherwise False.	TextFalse, TextTrue, or TextDisabled, as appropriate.
	The TextTrue property equals the empty string, and the BooleanMode property is set to 1 (ThreeState).	1, representing True, 0, representing False, or Disabled if otherwise.	0, 1, 2
	The TextTrue property equals the empty string, the BooleanMode property is set to 0 (TwoState).	1, representing True, or False if otherwise.	0, 1
Numeric	GroupValue property = 0, BooleanMode property is set to 1 (ThreeState).	1, representing True, 0, representing False, Disabled if otherwise.	0, 1, 2
	The GroupValue property = 0, and the BooleanMode property is set to 0 (TwoState).	1: True, otherwise False.	0, 1, 2
	The GroupValue property does not equal 0, and the GroupSelect property is set to 2 (No more than One) or 3 (One and Only One).	If FieldValue =, then the GroupValue property = True.  If FieldValue is not =, then GroupValue = False.	The value returned by the GroupValue property, or 0 if no control in group is True (disabled states cannot be saved with groups).
	The GroupValue property does not equal 0.	(Field value and GroupValue equal GroupValue).	The value written back to the field is computed by oring all True GroupValues in the group.
	The GroupSelect setting is 1 (Any Combination) or 4 (One or More).	(Field value and GroupValue do not equal GroupValue).
6.    fpCalendar and fpClock Controls

-     Both the fpCalendar and fpClock controls can be bound to Text and Date/Time fields.

-     When bound to a text field, invalid data read from the field causes both controls to default to the current date and time.

-     When bound to Date/Time fields, only data accepted and displayed by the control is written back to the database.  Date or time data stored in the data field but not visible to the user remains unchanged.  By design, Date/Time fields can be bound to:

1.    A single control that displays both the date and time, or

2.    Two separate controls: one that displays the date, the other the time.  As a result, both a calendar and a clock can be bound to the same Date/Time field.

7.    fpBinary Control

-     The fpBinary control can be bound to a Binary field that contains either bitmap or icon data.

-     Data is always written back to the data control as a bitmap.

8.    fpComboBox and fpListBox Controls

-     The fpComboBox and fpListBox controls can be bound to Text, Numeric and Date/Time field types..

-     You can bind the edit and list portions of the combobox separately.

-     Bind the edit portion of a combobox or a single column listbox by setting the field type with the FieldType property and binding the data field with the DataField property.

-     When using multicolumn comboboxes or listboxes (Columns property is greater than 1), you must set the field type and bind the data field for each column.  Specify the column with the Col property, then set the field type with the ColFieldType property and bind the data field with the ColDataField property.

-     In addition, the list portion of a combobox can be bound to a field by setting the field type with the FieldType property and binding the data field with the DataFieldList property.

Note:  When the field type for a column in a combobox or listbox is not designated by the FieldType or ColFieldType property, the field defaults to a Text field type.

Reading and Writing Data

The Text, Value, and UnFmtText properties provide different methods for reading and writing data to and from the control:

The Text Property

The Text property reads and returns the data in the control exactly as it appears in the control.  Letters are returned as letters, punctuation marks as punctuation marks, and separator characters as separator characters.  When the Text property receives data, it does not distinguish between formatting characters and text or symbols and numeric characters.  Every character is treated as a text character and returned with the other characters in the control as a string.  When you are sending data to the database and want it all to be read as text, you should use the Text property.

The UnFmtText Property

The UnFmtText property reads and returns the data in the control without formatting characters.  Only characters (such as the numbers and the text) which represent raw data in the control are returned.  No separator characters, punctuation marks, or symbols are used.

The only formatting character returned by the UnFmtText property is a period, used to represent the decimal point in a numeric value.

The Value Property

Visual Basic does not support double and variant property types.  As a result, when double precision is required, the type of the Value property is a string.  When the Value property is used in a numeric expression, convert the string to a numeric value using the Val ( ) function to avoid string concantenation.  Any expression that results in a numeric value automatically converts to a string when assigned to the Value property, so no explicit conversion is required.

The date/time value is also returned as a string in the format ddddd.ttttt.  This format represents the date/time value serial number.  Refer to the DateValue function in Visual Basics Language Reference for more information.

For the fpBoolean control, the value returned by the Value property depends both on the state of the control and how the data is bound to a database.  The available numeric control states are False, True, and Disabled, which are represented numerically by the numbers 0, 1, and 2, respectively.  Data bound to a numeric field in the database returns the value of the Value property numerically as 0, 1, or 2, depending on the state of the control.

Note:  The Value (fpBoolean) property represents the state of an individual fpBoolean control.  When in a group the value of the group can be obtained by using the GroupValue property.


OnFocus Features

Overview

Focus is the ability to receive user input through the mouse or keyboard.  When a control has the focus, it can receive input from the user.  The insertion point is in the control which has the focus and data in the control may be modified.

Aware/VBX provides a group of OnFocus features which specify attributes for a control when it receives or currently has focus.  These OnFocus features set different looks and editing capabilities for a control when it has focus.  Each OnFocus property must be individually set by the developer.  After the control loses focus, the control returns to the same appearance specified normally for the control.

Visual OnFocus Cues

Aware/VBXs distinct visual characteristics for the OnFocus control allow the end user to easily distinguish the control which has focus from the rest.  By inverting the 3-D effect or setting a contrasting shadow, the user can quickly find the current active control.  These visual features are available for every Aware/VBX control.

The OnFocusInvert3D property reverses the three dimensional appearance of the control which currently has the focus to visually distinguish it from the other controls on the screen.  All of the 3-D color and style settings for the control are inverted and the control projects an opposite appearance than it usually does.  Figure 2.3 shows two controls with the same 3-D settings, but the right control has the focus and the OnFocusInvert3D property is set to True.  Note how different they appear, even though their initial 3-D settings are the same.

Figure 2.3	OnFocus Invert 3-D

Another visual OnFocus feature available for all of the Aware/VBX controls is the OnFocus drop shadow.  The OnFocusShadow property determines whether a dropshadow is automatically drawn behind a control when the control is in focus.  The dropshadow visually cues the user to the control which currently has focus.

When the OnFocusShadow property is set to True, a dropshadow is drawn outside of the border on the right and bottom of the control currently in focus.  The size of the dropshadow is determined by the DropShadowWidth property.  The color of the dropshadow is set with the DropShadowColor property.  When the OnFocusShadow property is set to False, no dropshadow is drawn.

In Figures 2.4a and 2.4b below, the controls on the left do not have OnFocus dropshadows, while the controls on the right do have OnFocus dropshadows.

Figure 2.4a	OnFocus Shadow with Focus

Figure 2.4b	OnFocus Shadow without Focus

The size of both controls on the right set with a drop shadow appear smaller than the controls on the left, even though the height and width properties are equal for all four controls.  The dropshadow is part of the control whether the control is in focus or not, and must be considered when setting the width and height of the control.

OnFocus Editing Features

There are many ways to modify data in a control and each time you may want to do it differently.  Sometimes you may want to run through a group of controls and replace every data entry as quickly as possible.  In other cases, each control may require you to make very specific modifications.  Then again, you may want to always return to the place in the control where you last edited, so you can pick up where you left off.

Aware/VBX OnFocus editing features are designed to give you the maximum flexibility when modifying data.  They let you determine how data in each formatted edit control is arranged when that control gets focus, so your application can be fully customized to suit your needs.

1.    Selecting Data

-     When the OnFocusNoSelect property is set to True, the entire content of the control currently in focus is selected for editing.  (See the right control in Figure 2.5, below.)  Because all of the data in the control is automatically selected, your first key stroke clears the contents of the control, allowing for quick editing.

-     When the OnFocusNoSelect property is set to False, the contents of the OnFocus control can be selected manually.  Use this setting when you want detailed editing of data or when you want to add data to the end of the edit field rather than deleting the previous contents.

-     The OnFocusPosition feature customizes the position of the caret when the control receives focus.  The caret may be set to the end of the data entry field, to the beginning of the data entry field, to the position it held when the control was previously in focus, or to the current position of the I-bar within the control (mouse use only).

Note:  The type of caret used in the on focus control depends on the edit mode the control is in upon receiving focus.  Use the CaretInsert and CaretOverWrite properties to specify the caret for each mode.

2.    Customizing OnFocus Alignment

-     The Onfocus align properties customize the alignment of text within a control when it comes into focus.  In Figure 2.2 below, both controls have been centered with the AlignTextH and AlignTextV properties for general display of the text in the control.  The control on the right, however, has been given a different alignment for when it receives focus, with the text placed in the upper left corner of the control (OnFocusAlignH is set to 1 (Top), OnFocusAlignV is set to 1 (Left)).  This arrangement makes it easier for the user to edit the data in the control without losing the display style set for the control when it is not in focus.  This is especially useful when the user is retrieving and editing lists of data from databases which have stored their records differently.

Figure 2.5	On Focus Alignment and Selection


Setting Margins

Left, right, top and bottom margins may be set for any Aware/VBX edit control.

The following guidelines apply to all margin properties:

-     The default margin setting is 3 pixels.

-     Margins may be set to integer values between 0 and 15 pixels.  No negative values or fractional values are allowed.

-     The size of a margin remains constant despite the settings of the BorderWidth or BorderStyle properties.  Therefore, you must take into account the effect of both the border size and the margin size when determining how large you want the client area of the control.

-     The alignment properties (AlignTextH, AlignTextV, AlignPictureH, AlignPictureV, OnFocusAlignH, and OnFocusAlignV) are always set in reference to the margins of the control.  If the left and right margins are unequal or the top and bottom margins are unequal, the Center setting for each of the alignment properties will center the data in the control between the margins, not between the edges of the control.

Figure 2.6 Margin Discrepencies

Figure 2.6 above illustrates how unequal margins skew the alignment of the text in the control.  In the control on the left, the MarginLeft, MarginRight, MarginTop, and MarginBottom properties are each set to 3 pixels (the default margin value).  In the control on the right, the MarginLeft, MarginRight, MarginTop, and MarginBottom properties are set to 15, 3, 10, and 1 pixels, respectively.  In both controls the AlignTextH and AlignTextV properties are set to 2 (Centered).  Note that the text in the control on the right appears to be placed in the bottom right of the control.  The text in both controls is actually centered with respect to the margins, but because the margins are unequal, the text on the right appears uncentered.


Redrawing and Optimization

The Redraw feature in Aware/VBX is designed to eliminate flickering of the control and optimize load times when setting multiple properties.  When the Redraw property is set to True, the default value, the screen is automatically updated each time a change is made to the control.  Constant changes to the data, no matter how small, make the screen appear to flicker unattractively.  When the Redraw property is set to False, both painting and formatting caused by property changes are disabled.

Set the Redraw property to False before making many formatting changes or display changes within a control.  Then, after you have set the properties as desired, reset the Redraw property to True (the default value).  All formatting and painting changes made while the Redraw property was set to False will now occur nearly simultaneously, and the flickering will be eliminated.

The Redraw property is available for all controls in Aware/VBX except for the fpComboBox and fpListBox controls.


Setting a 3-D Appearance

You can design a customized 3-D appearance for any Aware/VBX control by combining styles, highlight and shadow colors, and border widths creatively.

Components of the 3-D Look

The Aware/VBX 3-D properties contrast border shadows, highlights, and widths around the control to create a three dimensional look for a control.  Three borders can edge the control (the outside border, the inside border, and the frame between) and use complementary properties.

Figure 2.7	Components for creating a 3-D look.

Figure 2.7 above illustrates how each 3-D property is used to set a standard 3-D look for a control.  These properties are described in detail below.

3-D Styles

The possible styles for creating a 3-D appearance are None, Raised, and Lowered, and are set with the ThreeDInsideStyle and ThreeDOutsideStyle properties. ThreeDInsideStyle and ThreeDOutsideStyle properties determine whether the control uses an inner and an outer border for creating a 3-D effect, respectively.  The control appears raised or lowered when using these properties because the borders are divided into highlighting and shadow lines.

The ThreeDHighlightColor property sets the color used on the inside and outside highlighting lines of the control.  The ThreeDShadowColor property sets the color used to create the shadows on the inside and outside shadow lines of the control.  Note in Figure 2.8 that two sides of the outside border are white (the highlighting color) and two sides are gray (the shadow color).  The same is true of the inside border.  These colors contrast against the BackColor of the controls parent so the control appears to project out of or into the screen.

3-D Widths

The ThreeDOutsideWidth and ThreeDInsideWidth properties set the width for the innermost and outermost borders of the control (See Figure 2.7 above) when the ThreeDInsideStyle and ThreeDOutsideStyle property settings are greater than 0.  These widths may be set to any integer greater than 0.  Large widths distract from the data inside of the control, and are not recommended.

Figure 2.8	3-D Looks

When both the ThreeDInsideStyle and ThreeDOutsideStyle property settings are greater than 0 (None), a frame is available between the inside and outside borders to enhance the 3-D effect.  The ThreeDFrameWidth property sets the width of the frame.  The bottom left control in Figure 2.8 uses a 3-D frame with the ThreeDFrameWidth property set to 2).  Note that the standard Microsoft 3-D look in the top right control does not use a 3-D frame.

The 3-D frame is not available when either 3-D style is set to 0 (None), because only one border is shown.  You can set the ThreeDFrameWidth to 0 when you do not want a frame between the inside and outside borders.  The top left control in Figure 2.8 is set with no 3-D frame (ThreeDFrameWidth = 0).

Note:  The color of the 3-D frame defaults to the BackColor of the form on which the control is placed.  If you wish to change the frame color, use the BorderGrayAreaColor property.

Other Considerations

The BorderStyle property can be used to place a border around the outermost edge of the control.  While the BorderStyle property may be used in conjunction with the 3-D properties, it is not normally used with the 3-D properties.  It defaults to a single line in all Aware controls (See the lower right 3-D look in Figure 2.8), and must be set to 0 (No Border) to remove it.

The OnFocusInvert3D property works by inverting the 3-D highlight and shadow colors for the inside and outside borders of the control.  If you are planning to use this property, make sure that the highlight and shadow colors provide the look you want when inverted.

Note:  The standard 3-D border properties listed above are optional with all of the Aware controls except for fpComboBox and fpListBox and may be set in any order to achieve the 3-D appearance for the control.

3-D for fpComboBox and fpListBox Controls

The same general principles for creating a 3-D appearance using the standard 3-D properties apply to the 3-D properties for the fpComboBox and fpListBox controls.  ThreeDStyle properties set a lowered or raised look, highlight and shadow line colors are contrasted against each other and the BackColor of the control, and the width is adjusted for a more dramatic 3-D effect.

These two controls, however, use unique sets of 3-D properties for setting different components of the control.

-     The Line3D properties, LineHighlightColor, LineShadowColor, LineStyleH, LineStyleV, and LineWidth, apply to the horizontal and vertical lines drawn between items in the combobox or listbox.

-     Separate 3-D style properties are used for the horizontal and vertical lines in these two controls.  This allows you to hide vertical or horizontal lines as desired without losing the 3-D look.

-     The Header3D properties, Header3DStyle and Header3DWidth, apply to the column headings of the combo box or listbox only.

-     The Header3D appearance uses the highlight and shadow colors set by the LineHighlightColor and LineShadowColor properties, respectively.

-     Use the Header3DWidth and Header3DStyle properties to make the headers stand out from the rest of the combobox or listbox.

-     The Selection3D properties, Sel3DHighlightColor, Sel3DShadowColor, Sel3DStyle, and Sel3DWidth, apply to the selection only.

-     You can contrast the selection properties against the Line3D properties to make the selection stand out from the rest of the combobox or listbox.

Note:  Set the 3-D text look independently from the 3-D border look.  Refer to the next section Setting 3-D Text for details on 3-D text features.


Setting 3-D Text

A 3-D text appearance may be set for all Aware/VBX controls except for the fpBinary and fpMemo controls.  The properties used for setting the 3-D text appearance differ depending on the control you are using.  The table below lists the Aware/VBX controls and the properties provided to set the 3-D text appearance for each:

Aware/VBX Control	3-D Text Properties	3-D Text Applies To
fpBinary, fpMemo	None.	None.
fpBoolean, fpClock, fpCurrency, fpDateTime, fpDoubleSingle, fpLongInteger, fpMask, fpText	ThreeDText, ThreeDHighlightColor, ThreeDTextOffset, ThreeDShadowColor properties (do not apply in the fpClock when the ClockStyle property = 2 (Analog).	All text in the control.
fpCalendar	Element3DText property.	The individual calendar element (specified by the Element property).
fpComboBox, fpListBox	Header3DText, Header3DTextHighlight, Header3DTextOffset, Header3DTextShadow, List3DText, List3DHighlightColor, List3DTextOffset, List3DShadowColor properties.	The Header3DText properties apply to column header text only.  The List3DText properties apply to the text in the rest of the control.
The 3-D text effect is created by rewriting the text in contrasting highlight and shadow colors to the text and background colors of the control and then offsetting the rewritten portions from the actual text.

Figure 2.10	Etched and Embossed 3-D Text

You can set the text style with the 3-D text properties (ThreeDText, Element3DText, Header3DText, List3DText) to appear etched or embossed, with heavier shading as desired.  Figure 2.10 illustrates these options.  Contrast the shadow and highlight color properties to create a dramatic 3-D text appearance.

The offset properties set the width for the shadow and highlight text.  The width of the offset should be based on the font size of the data in the control.  The ThreeDTextOffset property setting for the controls in Figure 2.10 is 1.

Note:  The fpCalendar control does not support 3-D offset or color properties.  The text offset for this control is automatically set based on the FontSize property for the specified element.  The 3-D Highlight and Shadow colors for these controls are &H80000014& (Windows System Button Highlight Color) and &H80000010& (Windows System Button Shadow Color), respectively.


Button Behavior

Figure 2.11	Aware/VBX Buttons

All of the formatted edit controls support buttons for your application.  These buttons allow the user to interact with the application by clicking on the button to perform a command.  When the user clicks on, or pushes, the button, it looks as if it is being pushed in and released, and an appropriate action is performed.  The ButtonHit event fires whenever the user clicks a button.

You can use buttons to scroll horizontally through text, increment or decrement numeric values, pull up dialog boxes, or drop down option lists.  You can use the Aware/VBX button default behavior provided or implement your own button behavior for a control.  The ButtonDefaultAction property determines whether a control uses the default behavior or allows you to implement the button behavior independently.

Customizing Button Behavior

Designing your own button behavior is possible by setting the ButtonDefaultAction property to False.  Once you have turned off the button default behavior, you can create and customize a button for your control as follows:

ButtonStyle Settings	Click Action
0	None
1	Spin Button:  Increments or decrements the value in the control.
2	PopUp Button (Ellipse button): Pops up a dialog box.
3	DropDown:  Pulls down a list of options.
4	Slide:  Scrolls through data.
1.    Select the type of button you want for your control with the ButtonStyle property (see table and Figure 2.11 above).  These button styles are available for all of the Formatted Edit controls.  The ButtonStyle property setting you choose depends on the action you want to occur in the control.  The table above lists the available Button Styles and the common behavior for each.

2.    The ButtonMin and ButtonMax properties constrain the ButtonIndex by setting minimum and maximum allowable values for the ButtonIndex in the control, respectively.  The ButtonWrap property determines whether the ButtonIndex will wrap when the maximum or minimum constraint for the button index is reached, as specified below:

-     When the ButtonWrap property is set to True (the default value), the button will spin up or down until it reaches the ButtonIndex value set by the ButtonMax or ButtonMin property, then wrap to the lowest or highest value, respectively, and continue to spin.

-     When the ButtonWrap property is set to False, a button click will not increment or decrement the value in the control nor will the value wrap around to the ButtonMax or ButtonMin value, and a UserError event is fired.  See the Chapter 5, Events, for a detailed explanation of the UserError event.

3.    Use the ButtonWidth property to set the width of the button in the control.  The units for the ButtonWidth property match the scale mode of the form containing the button.

Note:  The button default occurs after the ButtonHit event is fired. Therefore, the ButtonIndex value returned is the value of the field at the time that the event is fired, and therefore may appear to be behind by one increment. Consider this when you are coding to ensure that you retrieve the correct value.

Default Button Behavior

Default button behavior makes adding a button to a control easy.  When the ButtonDefaultAction property for a control is set to True, a default button and logical behavior for that button is assigned based on the type of formatted data the control supports.

The Spin button in Figure 2.11, for example, is the default button used with numeric controls and the fpDateTime control.  It allows for incrementing and decrementing of the value in the control.  The Slide button is the default button used with the fpText control.  It allows horizontal scrolling through text.

The following table lists the controls which use default buttons and the default button properties provided for each control.  Some button properties are not available with default behavior.  For example, ButtonIncrement, ButtonMax, and ButtonMin properties are not used with default behavior.  Consult the table for corresponding properties.

Control	Button Default Behavior
fpCurrency, fpDoubleSingle, fpLongInteger	Spin Button (ButtonStyle =1):  Control values can be incremented by pressing the up arrow button or decremented by pressing the down arrow button by the amount set by the IncDec and IncInt properties.  The IncDec property allows you to set a floating point value for incrementing or decrementing, while the IncInt property allows you to set integer values only. Note:  The fpLongInteger control does not have an IncDec property because it does not support floating point values.
fpDateTime	Spin Button (ButtonStyle =1):  The days, months and years in the fpDateTime control are incremented or decremented with each button press by one day, month, or year at a time, respectively, depending on where the caret is positioned in the date.
fpText	Slide Button (ButtonStyle =4):  Text is scrolled through horizontally.  The number of text characters scrolled through with each button press is set with the IncHoriz property.
Note:  When the ButtonDefaultAction property is set to True, one default ButtonStyle is available for a control (see the table above).  The other ButtonStyles can be used but must be assigned button behavior; they do not exhibit default behavior.

Disabling Buttons

You can disable a custom button or a default button independently of the rest of the control by setting the ButtonDisable property to True.  When a button is disabled, the areas of the button which are normally black appear white instead.  Buttons are not disabled when the ControlType property is set to Static.

Figure 2.12	Disabled and Enabled Slide Buttons

The user can see the disabled button (as in Figure 2.12) and click on the disabled button in the control, but no button behavior will occur, nor will a ButtonHit event be fired.  Other parts of the control may still be edited or enabled when the ButtonDisable property is set to True.

Hiding Buttons

You can hide a button by setting the ButtonHide property to True.  A hidden button is not displayed in a control when the control is out of focus.  When the control receives focus, the button appears.

Note:  Unless the ButtonStyle property is set to 0 (No Button) or the ButtonHide property is set to True, the button is displayed at all times in the control, whether it is disabled or not.


International Settings

In order to design applications for use by worldwide audiences, country and language independence must be available in the controls.  Aware/VBX provides the developer with default settings for certain properties which are internationally adaptable.

Aware/VBX Properties Using International Settings as Defaults

Property	International Setting Default
CurrencyDecimalPlaces	-1
CurrencyNegFmt	0
CurrencySymbol	0 or " "
DecimalPlaces	-1
DecimalPoint	0 or the empty string (" ")
LeadZero	0
Separator	Empty string (" ")
Note:  All properties using International Settings have 0 or the empty string as the default value except for decimal places, which uses -1 to default to the international setting.  This is because the number 0 is a valid setting for the number of decimal places desired.

When an Aware/VBX property from the table above is set to its default value, the International Setting from the current Windows System is returned, regardless of the System setting used when the developer designed the application.  The developer can thus create an application which performs under any Windows System setup, giving the application the flexibility to perform in an international market.

The WIN.INI File

The default property settings are derived from international information stored in the Microsoft Windows operating system WIN.INI file.  The WIN.INI file contains current country settings for currency symbols and date and time formats, as well as other information.  These international settings may be modified through the Control Panel in the Main window of the Program Manager.

Updating Aware Controls with New International Settings

Aware/VBX controls are not updated when the user changes the international settings via the control panel because the WM_WININICHANGE message is sent ONLY to the application and Visual Basic does not pass this message to the controls.  Also to improve load speed and prevent multiple reads of the WIN.INI file when a form with more than one Aware/VBX control is loaded, the WIN.INI data is read only the first time it is needed.  If a user changes the WIN.INI settings when using Aware/VBX, the user must close all applications that use Aware/VBX.  Aware/VBX loads the new settings when one of the applications that use Aware/VBX is reopened.


Insert and Overwrite Features

Overview

Two editing modes are available to the developer and the user for onscreen editing: Insert Mode and Overwrite Mode.  When you are editing in Insert mode, typing into the edit field of the control causes the characters to the right of the insertion point to shift to the right.  Upon insertion of new characters, the characters on the far right of the control which no longer fit are truncated.  When you are editing in Overwrite Mode, characters typed into the edit field of the control automatically replace the characters to the right of the caret.

Setting Caret Types

You can set different caret types for Insert mode and Overwrite mode to visually indicate the current editing mode to the user with the CaretInsert and CaretOverWrite properties, respectively.  Five caret types are available:  single, underline, double, triangle, and block (See Figure 2.12, below).

Figure 2.13	Caret Styles for Insert or Overwrite modes.

The user can toggle between Insert and Overwrite modes with the <Insert> key on the keyboard.  The ChangeMode event is fired each time the edit mode is changed.


Handling Invalid Data

All of the Aware/VBX formatted edit controls are capable of handling invalid data placed in the control either programmatically or by a data control.  The InvalidData feature permits strict, character by character validation of user input while allowing the user to view entire records which may contain invalid data.

Being able to view invalid data is valuable because:

1.    The user can have access to needed records despite the presence of invalid data.  When data is strictly validated without allowing for invalid data (especially when being read from a database), the user may not have access to any records, even if few are invalid.

2.    Viewing invalid data can often provide the user with enough information to determine what the valid data should be, thus reducing the possibility of errors caused by strict validation of data.

3.    It allows the user to detect programmer error in setting invalid data to controls.

Editing Invalid Data

When reading in data from a database or entering data programmatically, set the UserEntry property to 0 (Formatted).  When the UserEntry is in Formatted edit mode, data entered in an Aware/VBX formatted edit control is subject to strict validation.

As soon as invalid data is read from a record or set programmatically, the edit mode switches from Formatted edit mode to Invalid Data entry mode for that control.  Invalid data entry mode permits data entry in the control without character by character validation, allowing the user to correct data as needed.  You may manually switch the control into Invalid Data entry mode by setting the UserEntry property to 1 (FreeFormat).

Note:  Invalid data is never written back to the database.  If the correction of invalid data read from a database is still invalid, the new invalid data is NOT written back to the database.  When the record is read after the update, the new invalid data is discarded and the previous invalid value remains in the record.

Clearing Invalid Data

Clearing the control of Invalid Data is necessary in order to resume strict, character by character validation.  This can be accomplished as follows:

-    The end user can clear invalid contents from the control immediately by selecting the entire contents of the control and pressing <Delete>.

-    The end user can clear the contents of the control upon losing focus by setting the InvalidOption property to 2 (ClearData).

When the contents of a control in Formatted User Entry mode are cleared of invalid data, character by character validation begins.  This strict validation means that the user cannot make the contents of the control invalid; the control will only accept valid data.

Note:  When the AllowNull property is True, the above methods clear the control of invalid data and return the Null value as the value of the field.  When the AllowNull property is False, the control will default to the system value for that particular type of edit control.  For example, Numeric controls default to zero and fpText controls default to the empty string when AllowNull is False.

Hiding Invalid Data

You can hide invalid data in a control by setting the InvalidOption property to 1 (Hide Data).  Invalid data in the control is hidden from view when the control loses focus.  Upon returning focus to the control, the invalid data reappears in the control for the user to correct as desired.

Note:  Hiding invalid data does not remove it from the control.  To clear the control of invalid data,the user can select the entire contents of the control and press <Delete>, or the application can set the InvalidOption property to 2 (ClearData).

Targeting Invalid Data

The InvalidColor property allows the developer to designate an invalid color for the background of a formatted edit control.  This invalid color appears as the background color for the control when data entered into the control by the user is invalid.  The InvalidColor property can act as a time saving debugging tool for applications with numerous places for data entry because it quickly reveals any controls which contain invalid data.

When reading in records from a database or using the CharValidationText property (fpText control only), set the InvalidColor property to a color which contrasts with the BackColor of the control.  The designated InvalidColor appears as the background of the invalid data in the control when the control loses focus.  You can easily scan records, find invalid data and fix it, preventing programming errors during development or invalid data entry at run time.

Exceptions when Editing Invalid Data

In cases when partial (invalid) data entry must be permitted, forcing a control into InvalidData entry mode at every keystroke prevents necessary character and range validation, and should not occur.  Aware/VBX does not force a control into Invalid Data entry mode when data is deemed invalid in these cases:

1.    Range Checking in Numeric (fpCurrency, fpDoubleSingle, fpLongInteger) and Formatted fpDateTime controls.

-     The range of values permitted in an fpLongInteger control, for example, may be specified as integers from 100 to 1000 with the MinValue and MaxValue properties, respectively.  In order to enter the number 999 (a valid entry) in the control, the user must enter the number 9 (an invalid entry).  If strict, character by character, validation occurred in this case, the control would determine that the 9 was out of range and the control would shift into Invalid Data entry mode.  Instead, strict character by character validation is suspended when range checking and the control does not validate the data until the user attempts to exit the control.

-     The same range checking is true in an fpDateTime control which has been set with DateMin and DateMax values.  Character by character validation must be suspended and partial data allowed in order to enter an acceptable date into the control.

-     If the user attempts to exit either a Numeric or an fpDateTime control with only partial data entered, the control fires the InvalidData event and any behavior specified by the InvalidOption and InvalidColor properties will take effect.  The control is not forced into invalid data entry mode, but the IsValid property is returned as False.

2.    When the RequireFill property is set to True in an fpMaskControl.

-     In this case, for example, when RequireFill is True, the input mask must be entirely filled in order for the data to be considered valid.  The user may want to fill the mask, however, by typing in data one character at a time.  If strict, character by character, validation occurred in this case, the control would determine that the mask was invalid because the mask is not full, and the control would shift into Invalid Data entry mode.  Instead, strict character by character validation is suspended when RequireFill is True and the control does not validate the mask until the user attempts to exit the control.

-     If the user attempts to exit the fpMask control with only partial data entered, the control fires the InvalidData event and any behavior specified by the InvalidOption and InvalidColor properties will take effect but the control is not forced into invalid data entry mode).).

The developer in these cases can prevent the control from losing focus by setting the value of the NextWnd parameter in the InvalidData event to 0.  In this situation, the user should be given explicit instructions as to how to correct the data error.

Design Time Considerations

The developer is responsible for providing the user with and maintaining valid contents for the controls.  The developer must set the controls with valid data at design time, or the user will get improperly formatted controls.

Therefore, if the developer sets invalid data in the control, although the UserEntry property is set to 0 (Formatted) at design time, the control receives invalid data at run time.  Invalid data at run time forces the UserEntry mode to 1 (FreeFormat), preventing strict validation of user entered data, and causing user errors and confusion.

In the numeric controls, for example, the control name is the initial default string in the Text property at design time rather than a valid numeric value.  This Text property string determines the initial contents of the control at run time.  The developer must change the string in the Text property from the invalid default value to a valid numeric value at design time or the contents of the control will be invalid at run time.  The developer can change the Text property to a valid value at design time by setting it on the property list or by using Visual Basics Form_Load event to ensure content validity.

Determining the Status of Data in a Control

You can retrieve the invalid or valid status of data in a control with the IsValid property.  The IsValid property is returned as False when the InvalidOption property is set to 1 (Hide Data), because the invalid data remains in the control although it is hidden from view.  The IsValid property is usually returned as True when the InvalidOption property is set to 2 (Clear Data), because the control has been cleared of all invalid data.

In the following cases, however, the IsValid property is returned as False when the InvalidOption property is set to 2 (Clear Data):

1.    When the RequireFill property is set to True in an fpMask control.  In this case, the control remains invalid despite being cleared because the control must be filled in order to be valid.

2.    When a numeric control has been set with a range (using the MinValue or MaxValue properties) which does not include the default value returned by clearing the control.

For example, when the fpLongInteger control is set with the MinValue of 100 and a MaxValue of 1000, the default value 0 returned in the control is an invalid value.  In this case, the IsValid property is False when the control is cleared.

Note:  When the AllowNull property is set to True, clearing all data from the control leaves the Null value in the control.  Use the IsNull property to retrieve the Null status of the control in this instance.


Null Values

Overview

When entering data into a control, either from a database or through user entry, some values may be unavailable, or unacceptable.  In such cases, you can assign the data field a special value called Null to indicate that no data was actually entered into the data field.  Use the Aware/VBX Null features to provide more accurate expression of the data in an edit control.

Null Features

In order for a control to recognize Null as a distinct value, the AllowNull property must be set to True.

For all of the controls except the fpText control (see Note below), the field value is recognized as Null when:

1.    The user selects the entire content of the field and deletes it, or

2.    The empty string is set into the control by the application.

When the AllowNull property is set to False (the default value), Null values are not accepted in the control.  Deleting the contents of the control or entering the empty string into the control have the same effect as setting the default value when the control loses focus.  The default value for each formatted edit control is as follows:

Edit Control	Default Value
fpCurrency	0.00
fpDateTime	Current System Date
fpDoubleSingle	0.00
fpLongInteger	0
fpMask	Empty string
fpText	Empty string
Note:  The Null value and the blank string in the fpText control do not represent the same value.  Use the keyboard shortcut <Ctrl+N> or set the Action (Formatted Edit) property to 4 (SetNull) to set the text string to Null.

The IsNull property returns the Null status of the value in a control.  Use the IsNull property to check a control to see if the data is actually an entered value or if it is Null (data was unknown or unavailable for that field).  The state of the IsNull property may be changed by setting the Action (Formatted Edit) property to 5 (SetNull), by clearing a field of invalid data when the AllowNull property is set to True, or by pressing <Ctrl+N> on the keyboard.

The NullColor property visually cues the user that the data in the control is a null value.  The background color of the control changes to the specified NullColor whenever the data in the control is Null, visually cueing the null status of the data in the control to the user.


User Access to Data

You can set any formatted edit control at design time to be Read Only or Static with the ControlType property.  When a control is Read Only (ControlType = 1), the user can set focus on the control but cannot modify the contents of the control.  Use this setting to specify whether data in the control can be changed.  When a control is Static (ControlType = 2), the control displays non-editable text, but focus may not be set to the control.  Click events still fire and buttons are not disabled when the ControlType is Static.  You can disable the buttons independently of the rest of the control by setting the ButtonDisable property to True.

Do not confuse the ControlType property settings with the Enabled property.  The Enabled property changes the appearance of the control and does not accept focus.


Numeric Controls

Overview

The numeric controls, a subset of the Aware/VBX Formatted Edit Controls, consist of the fpCurrency control, the fpDoubleSingle control, and the fpLongInteger control.  These three controls provide data aware formatting and editing for numeric values.  The fpCurrency and fpDoubleSingle controls are floating point controls, supporting numeric data containing both integer and decimal values.  The fpLongInteger control supports integer values only.  These three controls share several common features:

General Numeric Features

Maximum and Minimum Values

Maximum or minimum user-entered values may be defined by the developer for the numeric controls using the MinValue and MaxValue properties.  These values allow the developer to limit data entry to a specific range in the control.  The default values for the MinValue and MaxValue properties depend on the data type of the control.  The following table lists the available data types for the numeric controls and the minimum value and maximum value which may be set for each.

Type Name	Min Value	MaxValue
Integer	-32,768	32,767
Long	-2,147,483,648	2,147,483,647
Single	340E-38	340E+38
Double	1.79E-308	1.79E+308
Currency	1.79E-308	1.79E+308
Negative Format Settings

The numeric controls offer properties for formatting the display of negative numeric values in the control.  Negative numeric values may use different formatting characters to symbolize the negative sign of the value.  For example, the minus sign -, or the parentheses ( ), can be used to denote a negative value.  The symbol may be placed in front of or behind the number.

Note:  There are no International Settings for noncurrency negative formats.

Use the NegFmt property with the fpDoubleSingle and fpLongInteger controls for setting the appearance of negative values.  The following three settings are available:

NegFmt Setting	Description
0	(1)
1	-1
2	1-
Use the fpCurrency controls similar property, the CurrencyNegFmt property, for setting negative currency values.  Because the settings combine the negative sign with the currency symbol for the type of currency being used, 11 settings are available for the CurrencyNegFmt property:

Currency Negative Format Setting	Description
0	[Intl]:  Returns the International Setting based on your Windows system configuration.
1	($1)
2	-$1
3	$-1
4	$1-
5	(1$)
6	-1$
7	1-$
8	1$-
9	-1 $
10	-$ 1
11	$ 1-
Note:  The negative format set by the CurrencyNegFormat property may differ from the positive format set by the CurrencyPlacement property for an fpCurrency control.  Check the two settings for consistency when using both negative and positive values in the control.

Negative Toggling

When the NegToggle property is set to True, you can toggle a value in a numeric control from negative to positive and back by pressing the <Minus> key on the keyboard.  This keyboard shortcut feature may be turned on or off for individual controls and may be accessed when the caret is at any place in the control.  The NegToggle property is not affected by the NoSpecialKeys property setting.

Separator Features

You can customize the look of a numeric control by setting the character used to separate the thousands places with the Separator property.  The separator character is a string value which defaults to the empty string if no character has been selected.  Set the Separator property to an empty string in order to default to the Windows International Setting for the system.

Note:  The Separator property only applies to the numeric controls and the fpClock control.  Set the separator characters for the fpDateTime control with the UserDefinedFormat property.

The UseSeparator property determines whether to use the separator character specified by the Separator property in the numeric control.  You can set the UseSeparator property at design time or programmatically at run time.

When the UseSeparator property is set to True (the default value), the separator set by the Separator property is used to separate thousands places in numbers with more than three digits.  When the UseSeparator property is set to False, no separator is used between thousands places, despite the Separator property setting.

Note:  The separator is included in the return of the Text property unless the UseSeparator property is set to False.  Use the UnFmtText or the Value property to return the string without the separator character.

Retrieving Numeric Values

When applied to the numeric controls, the UnFmtText property returns the value in the control as a string without formatted characters such as currency symbols or separator characters.  A period is used to represent the decimal point.

The Value property also returns a numeric control value as a string without formatted characters such as currency symbols, separator characters, or lead zeros, but uses the International Setting for the decimal point (as determined by your Windows System configuration).  This must be considered when determining how to assign or return data from a numeric control.

For more information on using the UnFmtText and Value properties, refer to the section Data Aware Issues:  Reading and Writing Data in this Chapter.

Floating Point Features

Decimal Places and Precision

You can set the maximum number of decimal places allowed for display in the two floating point controls with one of the decimal places properties.  The fpCurrency control uses the CurrencyDecimalPlaces property while the fpDoubleSingle control uses the DecimalPlaces property.  These two properties are the same except that the International Setting used as the default value differs for each.

If the value entered in the control contains more decimal places than the number set by the DecimalPlaces property, only the specified number of decimal places are displayed in the control.  In order to keep the decimal place precision of the number entered into the control, you can set the UserEntry property to 0 (FreeFormat).  The precise value entered in the control is maintained until the value is edited.  Upon editing and losing focus, the precision returned for the value in the control is limited to the number of decimal places specified by the DecimalPlaces property.

Figure 2.14	Floating Point Precision

In Figure 2.14 above, for example, both of the controls have been set with the numeric value .329.  The DecimalPlaces property for the control at the top left is set to two, however, while the DecimalPlaces property for the control at the top right is set to 3.  As is illustrated, the top left control displays only the two decimal places and therefore is rounded for display to .33

The value .4 is added to both controls and the sum returned for each.  Note that although the top left control only displays two decimal places, it maintains its precision, as is evidenced by the sum of .729 returned below.  This precision is kept until the control is actually edited by the user.

Fixed Point Options

The FixedPoint property determines whether a floating point value displays placeholding zeros for unfilled decimal places.

Figure 2.15	Fixed Point Options

When the FixedPoint property is set to True (the default value), the number of decimal places set by the DecimalPlaces property is always shown, including place holding zeros.  (See the left control in Figure 2.15.)  When the FixedPoint property is set to False, only the actual number of decimal places used are displayed, up to the number designated by the DecimalPlaces property.  Trailing zeros are not displayed as place holders.  (See the right control in Figure 2.15.)

Leading Zeros

The LeadZero property determines whether a floating point numeric control displays a leading zero for values less than 1.0 but greater than -1.0 in the control.  A leading zero (as in the value 0.22) acts as a placeholder for the ones place, indicating that the value displayed is indeed a decimal value.  You can use the LeadZero property to keep long lists of numbers aligned for easy readability.


Custom Controls

fpBinary Control

fpBoolean Control

fpCalendar Control

fpClock Control

fpComboBox Control

fpCurrency Control

fpDateTime Control

fpDoubleSingle Control

fpListBox Control

fpLongInteger Control

fpMask Control

fpMemo Control

fpText Control


fpBinary Control

Description

File Name

Discussion

fpBinary Unique Properties

Properties

Events

Methods

fpBoolean Control

Description

File Name

Discussion

Setting Boolean States

Displaying the Boolean States

Boolean Default Behavior

Group Properties

Changing fpBoolean Control States

fpBoolean Unique Properties

Properties

Events

Methods

fpCalendar Control

Description

File Name

Discussion

Customizing Calendar Components

Limiting the Calendar Range

Setting and Retrieval of Dates

fpCalendar Unique Properties

Properties

Events

Methods

fpClock Control

Description

File Name

Discussion

Customizing Clock Appearance

Setting and Retrieving Time

Setting a Clocks Timer

fpClock Unique Properties

Properties

Events

Methods

fpComboBox Control

Description

FileName

Discussion

MultiColumn ComboBoxes

Sorting Column Data

Binding the Edit Portion

List Portion of the ComboBox

Binding the List Portion

Retrieving and Setting List Items

Adding and Removing ComboBox Items

Customizing ComboBox Display

Virtual Data Management

fpComboBox Unique Properties

Properties

Events

Methods

fpCurrency Control

Description

FileName

Discussion

fpCurrency Unique Properties

Properties

Events

Methods

fpDateTime Control

Description

File

Discussion

Formatting and Calculating Dates and Times

Range Setting and Validation

Setting and Retrieval of Dates and Times

fpDateTime Unique Properties

Properties

Events

Methods

fpDoubleSingle Control

Description

File Name

Discussion

fpDoubleSingle Unique Properties

Properties

Events

Methods

fpListBox Control

Description

File Name

Discussion

ListBox Features

Setting Column Display

Sorting Column Data

Binding the ListBox

Retrieving and Setting List Items

Customizing ListBox Display

Adding and Removing ListBox Items

Virtual Data Management

fpListBox Unique Properties

Properties

Events

Methods

fpLongInteger Control

Description

File Name

Discussion

fpLongInteger Unique Properties

Properties

Events

Methods

fpMask Control

Description

File Name

Discussion

Defining Input Masks

Editing in an fpMask Control

fpMask Unique Properties

Properties

Events

Methods

fpMemo Control

Description

File Name

Discussion

fpMemo Unique Properties

Properties

Events

Methods

fpText Control

Description

File Name

Discussion

Formatting and Validating Data

Case Restriction

Limiting Character Entry

Limiting User Access

Display of Data in an fpText Control

fpText Unique Properties

Properties

Events

Methods


fpBinary Control

Description

The fpBinary control displays graphics from a bitmap or an icon and allows for resizing and scrolling of the graphics as desired.

Figure 3.1	fpBinary Control Styles

File Name	AWAREBB.VBX

Discussion

Set the graphic used in an fpBinary control with the Picture property.  Graphics in the fpBinary control may be stretched to fill the control entirely, scaled to fit proportionally in the control, or displayed incrementally using scrollbars.  You can customize the size and scrolling of the graphics in an fpBinary control with the BinaryStyle property.

Icons in an fpBinary control which are saved to a database are saved as bitmap files (.BMP) and are returned as bitmaps in future usage.

fpBinary Unique Properties

BinaryStyle

Determines how to place the bitmap in the control.

Picture

Determines a bitmap or an icon to be displayed in the control.

ScrollBars

Determines whether the control contains vertical or horizontal scroll bars as needed.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

BinListProperties
* About	FontName	TabIndex
BackColor	FontSize	TabStop
** BinaryStyle	FontStrikeThru	Tag
* BorderColor	FontUnderline	* ThreeDFrameWidth
* BorderGrayAreaColor	Height	* ThreeDInsideHighlightColor
* BorderStyle	* HelpContextID	* ThreeDInsideShadowColor
* BorderWidth	* hWnd	* ThreeDInsideStyle
DataChanged	Index	* ThreeDInsideWidth
DataField	Left	* ThreeDOutsideHighlightColor
DataSource	MousePointer	* ThreeDOutsideShadowColor
DragIcon	Name	* ThreeDOutsideStyle
DragMode	* OnFocusInvert3D	* ThreeDOutsideWidth
* DropShadowColor	* OnFocusShadow	Top
* DropShadowWidth	Parent	Visible
Enabled	** Picture	Width
FontBold	* Redraw
FontItalic	** ScrollBars
Events
* Advance	DragDrop	LostFocus
Change	GotFocus	MouseDown
Click	KeyDown	MouseMove
DblClick	KeyPress	MouseUp
DragOver	KeyUp	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpBoolean Control

Description

The fpBoolean Control provides two state or three state reasoning for data entry.

Figure 3.2	A Typical fpBoolean Control

File Name	AWAREBB.VBX

Discussion

The boolean states can be represented visually by a graphic from a bitmap or an icon, and/or by text information entered at design time or assigned to the control in code at run time.

Setting Boolean States

The fpBoolean control sets all variables in the control to values of zero (0), one (1), or two (2).  These numeric values represent the reasoning states of True, False, and Disabled, respectively.  The BooleanMode property sets the control to a Two-State True/False or Yes/No selection option or to a Three-State True/False/Disabled or Yes/No/Neither option.

Displaying the Boolean States

Each state of the fpBoolean control can be represented by graphics and/or text.  The type of display data (graphics, text, or both) is set by the BooleanStyle property.  Graphics and text may be manipulated independently of each other to overlap or align differently as needed.

-     Alignment

Figure 3.3	Boolean Alignment Options

Adjust the text and graphics in the control independently of each other with the Align properties (AlignPictureH, AlignPictureV, AlignTextH, and AlignTextV) to create a customized look for the control.  Figure 3.3 illustrates several combinations of text and graphic display in the control.

-     Text

Different text strings can be displayed in the fpBoolean control to represent the True state, the False state, and the Disabled state of the control by setting the TextTrue, TextFalse, and TextDisabled properties, respectively.

-     Graphics

The bitmaps corresponding to the False, True or Disabled states of the control can be predefined or user defined:

Figure 3.4	Boolean Picture Options

The four predefined graphic types above are available by setting the BooleanPicture property to 0, 1, 2, or 3.  User defined graphics may be used by setting the BooleanPicture property to 4.  The graphic types in Figure 3.4 are described below.

Boolean Picture	Description
0: CheckBox	For True State:  Displays an X when selected.  For False state:  The check box is cleared.  For Disabled state:  The CheckBox is grayed out (an X may or may not be displayed).
1: OptionButton	For True State:  Fills in the circle when selected.  For False state:  The option button is cleared.  For Disabled state:  The option button is grayed out (a circle may or may not be displayed).
2: ThreeD CheckBox	For True State:  Displays a check when selected.  For False state:  The checkbox is cleared.  For Disabled state:  The checkbox is grayed out (a check may or may not be displayed).
3: ThreeD Option	For True State:  Fills in the circle when selected.  For False state:  The option button is cleared.  For Disabled state:  The option button is grayed out (a circle may or may not be displayed).
4: UserDefined	Allows placement of user defined bitmaps into the control corresponding to the states of the control.  Bitmaps are set with the Picture properties.
You must set the BooleanPicture property to 4 (User Defined) to choose your own bitmaps for the different states of the control.  Once the BooleanPicture property is set to 4, individual graphics may be selected for the states with the PictureFalse, PictureFalseDisabled, PictureFalseDown, PictureTrue, PictureTrueDisabled, and PictureTrueDown properties.  The fpBoolean connectors can be assigned in text mode, graphics mode or using both text and graphics.

Boolean Default Behavior

When graphics and/or text for a control state is unassigned, default behavior occurs to select text or graphics to display for the state of the control.  The default behavior is as follows:

-     When the state of the control is True, and the TextTrue Property is set to the empty string, the control defaults to the text string assigned by the TextFalse Property.

-     When no bitmap is assigned for the PictureTrue property, the control defaults to the bitmap assigned for PictureFalse.

-     When no bitmap is assigned for the PictureFalseDisabled property, the control defaults to the bitmap assigned with the PictureTrueDisabled property.  If there is no assigned bitmap in the PictureTrueDisabled property, the control then defaults to the bitmap assigned in the PictureFalseDown property.  If there is no assigned bitmap in the PictureFalseDown property, the control defaults to the bitmap assigned in the PictureFalse property.

Group Properties

The fpBoolean Group properties allow fpBoolean controls to be grouped together and act interdependently.  The GroupID property assigns a name to a set of fpBoolean controls which are created on the same form. The GroupTag property assigns a unique value to an fpBoolean control that is a member of a group.  This GroupTag for each control is used to determine the state of each control in a group, and therefore to compute the value of the group as a whole (represented by the GroupValue property).

The GroupSelect property designates the method by which the controls in the Group work together.  The One and Only One setting (GroupSelect = 3), for example, allows only one control in the group to be in the True state at any given time.  Therefore, when the user selects one of the options in the group, all of the other controls in the Group are automatically toggled to False..

Figure 3.5	Group Option Buttons

Changing fpBoolean Control States

The state of the control may be changed in several ways.  You can set the AutoToggle property to True, which allows a spacebar or a mouse click to toggle the state of the control.  You can use the ToggleTrue and ToggleFalse properties to set a specific character string to toggle the state of the control to True or False, respectively.  The string selected for each of these properties must be mutually exclusive.  You can also set an fpBoolean control to toggle programmatically.

fpBoolean Unique Properties

AlignPictureH, AlignPictureV, AlignTextH, AlignTextV

Set the placement of the graphic and text within the control.

AutoToggle

Allows or prevents a mouse click or spacebar press to toggle value.

BooleanMode

Sets the data displayed in the control to two state or three state.

BooleanPicture

Sets the bitmap or icon to be used in the control.

BooleanStyle

Sets the control to display predefined or user defined graphics.

Caption

Sets the text displayed for the TextFalse state of the control.

GroupId

Sets or returns the group identifier for a control.

GroupSelect

Sets or returns the method used to compare the Value and GroupValue.

GroupTag

Assigns a unique value to an fpBoolean control that is part of a group.

GroupValue

Sets the value needed for the control to toggle.

MultiLine

Sets multiline text in the control.

PictureFalse, PictureFalseDisabled, PictureFalseDown, PictureTrue, PictureTrueDisabled, PictureTrueDown

Sets the graphic displayed for each state of the control.

TextDisabled, TextFalse, TextTrue

Sets the text displayed for each state of the control.

ToggleFalse, ToggleTrue

Sets or returns the character accepted in the control to toggle the state of the control.

Value

Returns the value displayed for each state of an individual fpBoolean control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
** AlignPictureH	FontUnderline	* Redraw
** AlignPictureV	ForeColor	TabIndex
** AlignTextH	** GroupID	TabStop
** AlignTextV	** GroupSelect	Tag
** AutoToggle	** GroupTag	* Text
* BackColor	** GroupValue	** TextDisabled
** BooleanMode	Height	** TextFalse
** BooleanPicture	* HelpContextID	** TextTrue
** BooleanStyle	* hWnd	* ThreeDFrameWidth
* BorderColor	Index	* ThreeDInsideHighlightColor
* BorderGrayAreaColor	Left	* ThreeDInsideShadowColor
* BorderStyle	* MarginBottom	* ThreeDInsideStyle
* BorderWidth	* MarginLeft	* ThreeDInsideWidth
** Caption	* MarginRight	* ThreeDOutsideHighlightColor
DataChanged	* MarginTop	* ThreeDOutsideShadowColor
DataField	MousePointer	* ThreeDOutsideStyle
DataSource	** MultiLine	* ThreeDOutsideWidth
DragIcon	Name	* ThreeDText
DragMode	* OnFocusInvert3D	* ThreeDTextHighlightColor
* DropShadowColor	* OnFocusShadow	* ThreeDTextShadowColor
* DropShadowWidth	Parent	* ThreeDTextOffset
Enabled	** PictureFalse	** ToggleFalse
FontBold	** PictureFalseDisabled	** ToggleTrue
FontItalic	** PictureFalseDown	Top
FontName	** PictureTrue	** Value
FontSize	** PictureTrueDisabled	Visible
FontStrikeThru	** PictureTrueDown	Width
Events
* Advance	DragDrop	LostFocus
Change	GotFocus	MouseDown
Click	KeyDown	MouseMove
DblClick	KeyPress	MouseUp
DragOver	KeyUp	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpCalendar Control

Description

The fpCalendar control is a fully functional stand-alone calendar which can be customized to support different calendar formats and appearances.

Figure 3.6	A Typical fpCalendar Control

File Name	AWARECC.VBX

Discussion

The fpCalendar control allows you to set the appearance of specific elements of the calendar, set date ranges for calendar display, and set methods for changing dates.

Customizing Calendar Components

-     Elements

The fpCalendar control is divided into elements specified by the Element property which represent different components of the calendar.  The following Element property settings are available:

Element Property Setting	Description
0-Default	Sets the default properties for color, style, etc.
1-Month	Selects the month title at the top of the calendar.
2-Days	Selects all days of the month.
3-Year	Selects the Year title at the top of the calendar.
4-WeekDays	Selects the WeekDay titles at the top of the calendar.
5-WeekDayIndex	Selects the individual weekday names.  (Used with the ElementIndex property).
6-DaysIndex	Selects the individual day numbers.  (Used with the ElementIndex property).
7-DropDown	Provides an optional DropDown button for the month and/or year titles.  A list drops down with month or year choices.  Colors and fonts may be changed on the month or year selected.
Each element above can be set individually at run time with colors, styles, and headers to create a customized calendar appearance.  The only part of the calendar that cannot be set with the element properties is the gray area.

Use the Element property to select a particular calendar component, then customize the appearance of that component by setting the other element properties from the following list:

ElementBackColor	Element3DShadowColor	Element3DText
ElementForeColor	Element3DShadowWidth
Element3DHighlightColor	Element3DStyle
Note:  To change the appearance of a particular week day header or day of the month on the calendar, you must select Element setting 5 (Weekday Index) or 6 (Days Index), use the ElementIndex property to specify the desired weekday (from 1-7) or day of the month (from 1-31), and then set the above properties.

-     The Gray Area of the Calendar

The gray area of the fpCalendar control refers to the empty day spaces on the monthly calendar before the first day of the month and after the last day of the month.  These day spaces are treated as one component and therefore may not be set with individualized appearances by the element properties.  You can customize the look of the gray area by setting the GrayAreaStyle, GrayAreaForeColor, and GrayAreaBackColor properties.

-     Header Styles

You can set the month and year headers to scroll or drop down selections by setting the MonthHeaderStyle and YearHeaderStyle properties, respectively.  These headers may also be shown or hidden by setting the HeaderStyle property.  The WeekDayHdr property is used to determine whether the weekdays use abbreviations or the long words for the days of the week.

Limiting the Calendar Range

You can set the maximum and minimum range of calendar dates for display and use by setting the DateMax and DateMin properties, respectively.  The format for entering these dates is YYYYMMDD.  You may not select the next or previous year when the month currently displayed on the calendar makes the date for that year exceed the range of valid date values.

Setting and Retrieval of Dates

Dates can be set programmatically using the CurrentDate, Day, Month, and Year properties.  Use the CurrentDate property when you want to set or retrieve the entire date.  Note that the format for the CurrentDate is YYYYMMDD.  Use the other properties when you only want to set or retrieve a part of the date.

fpCalendar Unique Properties

CurrentDate

Sets or returns the selected date in the calendar in the format "YYYYMMDD".

DateMax, DateMin

Sets or returns the maximum or minimum user-entered date in the format "YYYYMMDD".

Day, Month, Year

Sets or returns the selected day, month or year, respectively.

Element

Sets or returns the Element to apply the Element properties to in the fpCalendar control.  Not available at design time.

Element3DHighlightColor, Element3DShadowColor

Set the highlight color and the shadow colors used to create the 3-D effect for the selected Element, respectively.

Element3DShadowWidth

Sets the width of the shadow used to create the 3-D effect for the selected Element.

Element3DStyle

Sets the 3-D look of the selected Element.

Element3DText

Sets the 3-D appearance of the text of the selected Element.

ElementBackColor, ElementForeColor

Set the background colors and foreground color of the selected Element, respectively.

ElementIndex

Sets the specific weekday or day of the month of the selected Element.

FirstDayOfWeek

Sets either Sunday or Monday as the first day of the calendar week.

GrayAreaBackColor, GrayAreaForeColor

Set the colors used to paint the Gray Area on the calendar.

GrayAreaStyle

Sets the style of the gray area on the calendar.

HeaderStyle

Determines how to display the month and year headers on the calendar.

MonthHeaderStyle, WeekDayHdr, YearHeaderStyle

Set the style of the month header, the weekday column headers, and the year header, respectively.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	** ElementForeColor	* OnFocusInvert3D
* BorderColor	** ElementIndex	* OnFocusShadow
* BorderGrayAreaColor	Enabled	Parent
* BorderStyle	** FirstDayOfWeek	* Redraw
* BorderWidth	FontBold	TabIndex
** CurrentDate	FontItalic	TabStop
DataChanged	FontName	Tag
DataField	FontSize	* ThreeDFrameWidth
DataSource	FontStrikeThru	* ThreeDInsideHighlightColor
** DateMax	FontUnderline	* ThreeDInsideShadowColor
** DateMin	** GrayAreaBackColor	* ThreeDInsideStyle
** Day	** GrayAreaForeColor	* ThreeDInsideWidth
DragIcon	** GrayAreaStyle	* ThreeDOutsideHighlightColor
DragMode	** HeaderStyle	* ThreeDOutsideShadowColor
* DropShadowColor	Height	* ThreeDOutsideStyle
* DropShadowWidth	* HelpContextID	* ThreeDOutsideWidth
** Element	* hWnd	Top
** Element3DHighlightColor	Index	Visible
** Element3DShadowColor	Left	** WeekDayHdr
** Element3DShadowWidth	** Month	Width
** Element3DStyle	** MonthHeaderStyle	** Year
** Element3DText	MousePointer	** YearHeaderStyle
** ElementBackColor	Name
Events
** Change	DragOver	KeyPress
** DblClick	GotFocus	KeyUp
DragDrop	KeyDown	LostFocus
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpClock Control

Description

The fpClock control lets you create customized analog and digital clocks within your application.

Figure 3.7	Clock Styles for the fpClock Control

File Name	AWARECC.VBX

Discussion	The fpClock control supports common time formats and allows you to customize the appearance of the clock.

Customizing Clock Appearance

You can select one of three clock styles in an fpClock control with the ClockStyle property.  The clock style you select determines the features which can be set for the clock.  The styles and their features are listed below.

Note:  When you create an fpClock control on a form, the font size is automatically calculated.  It can be customized by setting the FontSize property.

-     Default and Digital Clocks

When the ClockStyle property is set to 0 (Default) or 1 (Digital) the clock displays the time using numerals (see Figure 3.7 above).

You can add customized AM and PM time strings to the default clock with the TimeString1159 and TimeString2359 properties.

The separator used between the numerals (the default is a colon) for both the default clock can be defined using the Separator property.  Both the digital and default clocks can also be set to display a placeholding zero (09:45, for example) with the LeadZero property.

-     Analog Clocks

When the ClockStyle property is set to 2 (Analog) the clock displays time using a clock face (see Figure 3.7 above).  The numbers, ticks, color, and hand shapes used on the clock face can all be customized.

-     Numbers and Ticks

You can set an analog clock to display Roman numerals, Arabic numbers or no numbers on the face with the AnalogFace property.  Use the AnalogTicks property to determine whether to show hour ticks, minute ticks, both, or none.

-     Colors

All of the fpClock control clock styles use the BackColor and ForeColor properties to set the background and numeral colors on the clock, respectively.

You can also set individual shadow and fill colors for the ticks and the hour, minute and second hands on the analog clock with the AnalogColor properties.  The outline colors you choose for the hands are always displayed in the control.  The fill colors for the hands can be disabled individually.  Set the AnalogFill properties for each hand to determine whether to use the fill colors.

-     Creating Customized Hand Shapes

You can customize the shape of each hand on the analog clock by setting an array of points used to draw the hand from the center of the clock face.  Each unique point is defined in polar coordinates (angle value, radius value), where the clock repesents a circle of radius 100.  The reference point for each angle is 0 degrees, located at the 12 oclock position on the clock face.  The reference point for each radius value is calculated from the center of the clock face (0 Units), and each radius value is expressed as a value between 0 and the maximum radius of 100.

Set the angle for each hand with the AnalogHandAngle property arrays.  Set the radius for each hand with the AnalogHandRadius property arrays.  The maximum number of points for each clock hand is 20.  Change the number of points to use to draw each clock hand with the AnalogHourHandPts, AnalogMinHandPts, and AnalogSecHandPts properties.

Figure 3.8	Analog Clock Default Hands

In Figure 3.8 above, the default point settings are used to draw the hour, minute and second hands on the clock face.  The default angle and radius arrays for each hand are listed below:

	Hour Hand	Minute Hand	Second Hand
	Angle	Radius	Angle	Radius	Angle	Radius
Array Point 1	0	70	0	90	0	90
Array Point 2	90	10	90	5	0	0
Array Point 3	180	10	180	5	--	--
Array Point 4	270	10	270	5	--	--
Array Point 5	0	70	0	90	--	--
Setting and Retrieving Time

Times can be set or retrieved programmatically using the CurrentTime, StartTime, ElapsedTime, and AlarmTime properties.  The default format for these properties is HH:MM:SS.  Use the CurrentTime property when you want to set or retrieve the current time.  Use the StartTime when the ClockMode property is set to 2 (StopWatch) to set a starting point for keeping the time.  Use the ElapsedTime to return the difference between the StartTime and the CurrentTime to tell how much time has passed.  Use the TimeScale property to change the format for these properties for coding purposes.

The Hour, Min, and Sec properties set or retrieve the hours, minutes, and seconds of the CurrentTime.  Use these properties instead of the CurrentTime property when you want to set a part of the time only.

You can set or retrieve an fpClock control to keep time as a 12-hour clock, a 24 hour clock, or as a stopwatch by setting the ClockMode property.  When the clock is set to 12 hour, you can use the TimeString1159 property to set the AM, or morning hour string for the clock.  Use the TimeString2359 property to set a PM string in the 12 hour clock, or to set a general string such EST or GMT for a 24 hour clock.

Display the current time in the control automatically when the clock is created by setting the AutoSet property to True.  Use this property when you want to see the current time as soon as the clock is created.

The AllowMoveHand property determines whether the user can change time on an Analog clock by dragging and dropping the hour, minute and second hands with the left or right mouse button.  When you set the AllowMoveHand property to 1 (Left) or 2 (Right), a MoveHand event fires as the hand is moved.  The CurrentTime does not get updated in the MoveHand event.  The CurrentTime is updated after the MouseUp event is fired and right before the Change event is fired.

Setting a Clocks Timer

You set a clocks timer by determining a time interval for the timer. The Interval property sets the time interval.  Each time the interval set by the Interval property is reached, the Timer event occurs.  After the Timer event fires, the interval is added to the CurrentTime.  To prevent updates to the CurrentTime set the AutoUpdate property to False.

After the interval is added to the current time, a Change event occurs to indicate that the time has been changed.  Note that the value returned by the CurrentTime property is not updated until the Change event is fired.  In the Timer event, the CurrentTime has not been changed.

When the AutoUpdate property is True, the clock automatically updates the time when a new interval is reached and the Timer event fires.  The Interval is set to 1 second by default, so the Timer event is called every second by default.

To prevent the clock from resetting each time and automatically updating the clock every time the Timer event fires (every second when the Interval is using the default value), turn the AutoUpdate property to False.  When AutoUpdate is False, the CurrentTime changes only when you manually move the hands or set the clock programmatically.

Note:  When placing multiple clocks on a form, use a timer on one and set other clocks in reference to the clock with the timer.  Windows limits the number of timers that can be used in an application, and multiple timers can deplete needed system resources.

fpClock Unique Properties

AlarmTime

Sets or retrieves the alarm time in the fpClock control.

AllowMoveHand

Determines whether to allow time changes by dragging and dropping the hour, minute and second hands with the left or right mouse button.

AnalogFace

Sets the appearance of the analog clock face in an fpClock control to display Roman numerals, Arabic numbers or no numbers on the face.

AnalogHourHandAngle, AnalogMinHandAngle, AnalogSecHandAngle

Set the vector angle of the hour, minute, and second hands on an analog clock face in an fpClock control, respectively.

AnalogHourHandPts, AnalogMinHandPts, AnalogSecHandPts

Sets the vector length of the hour, minute, and second hands on an analog clock face in an fpClock control, respectively.

AnalogHourHandRadius, AnalogMinHandRadius, AnalogSecHandRadius

Sets the vector length of the hour, minute, and second hands on an analog clock face in an fpClock control, respectively.

AnalogHourFill, AnalogMinuteFill, AnalogSecFill

Determines whether to use the fill color to fill in the minute, hour, and second hands or the ticks on an analog clock face in an fpClock control, respectively.

AnalogHourFillColor, AnalogMinFillColor, AnalogSecFillColor

Set the color used to fill in the minute, hour, and second hands on an analog clock face in an fpClock control, respectively.

AnalogHourHandColor, AnalogMinHandColor, AnalogSecHandColor

Set the color of the minute, hour, and second hands on an analog clock face in an fpClock control, respectively.

AnalogTickFillColor, AnalogTickShadowColor

Set the color used to fill in and shadow the ticks on an analog clock face in an fpClock control, respectively.

AnalogTicks

Sets the number of ticks displayed on the clock face in an fpClock control.

AutoSet

Determines whether the clock in an fpClock control automatically sets and displays the current system time when created.

AutoUpdate

Determines whether to update the time on the clock whenever a new time interval is reached.

ClockMode

Determines whether the clock in an fpClock control keeps time as a 12 hour clock, a 24 hour clock, or a stopwatch.

ClockStyle

Sets the look of the clock displayed in the fpClock control.

CurrentTime

Sets or retrieves the current time in an fpClock control.

ElapsedTime

Retrieves how much time has elapsed between the start time and the current time in an fpClock control.

Hour, Min, Sec

Sets or returns the hours, minutes or seconds for the CurrentTime.

Interval

Sets or returns the intervals in milliseconds between Timer events.

LeadZero

Determines whether to use a leading zero when displaying the time.

Seconds

Determines whether to show seconds when displaying the time.

Separator

Sets or retrieves the character used to separate the hours, minutes, and seconds.

StartTime

Sets or retrieves the start time in the fpClock control.

TimeScale

Determines the data entry format for the time in the fpClock control.  Used for coding purposes to easily change the value of the AlarmTime, CurrentTime, ElapsedTime, and StartTime properties.

TimeString1159, TimeString2359

Sets the string of characters to be appended to the time string to designate PM (evening hours and 24 hour clock) or AM (morning hours).

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	* BorderWidth	* OnFocusShadow
** AlarmTime	** ClockMode	Parent
** AllowMoveHand	** ClockStyle	* Redraw
** AnalogFace	** CurrentTime	** Sec
** AnalogHourFill	DataChanged	** Seconds
** AnalogHourFillColor	DataField	** Separator
** AnalogHourHandAngle	DataSource	** StartTime
** AnalogHourHandColor	DragIcon	TabIndex
** AnalogHourHandPts	DragMode	TabStop
** AnalogHourHandRadius	* DropShadowColor	Tag
** AnalogMinFill	* DropShadowWidth	* ThreeDFrameWidth
** AnalogMinFillColor	** ElapsedTime	* ThreeDInsideHighlightColor
** AnalogMinHandAngle	Enabled	* ThreeDInsideShadowColor
** AnalogMinHandColor	FontBold	* ThreeDInsideStyle
** AnalogMinHandPts	FontItalic	* ThreeDInsideWidth
** AnalogMinHandRadius	FontName	* ThreeDOutsideHighlightColor
** AnalogSecFill	FontStrikeThru	* ThreeDOutsideShadowColor
** AnalogSecFillColor	FontUnderline	* ThreeDOutsideStyle
** AnalogSecHandAngle	ForeColor	* ThreeDOutsideWidth
** AnalogSecHandColor	Height	* ThreeDText
** AnalogSecHandPts	* HelpContextID	* ThreeDTextHighlightColor
** AnalogSecHandRadius	** Hour	* ThreeDTextShadowColor
** AnalogTickFillColor	* hWnd	* ThreeDTextOffset
** AnalogTicks	Index	** TimeScale
** AnalogTickShadowColor	** Interval	** TimeString1159
** AutoSet	** LeadZero	** TimeString2359
** AutoUpdate	Left	Top
* BackColor	** Min	Visible
* BorderColor	MousePointer	Width
* BorderGrayAreaColor	Name
* BorderStyle	* OnFocusInvert3D
Events
** Alarm	GotFocus	MouseDown
Click	KeyDown	MouseMove
DblClick	KeyPress	MouseUp
DragDrop	KeyUp	** MoveHandEvent
DragOver	LostFocus	** Timer
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpComboBox Control

Description

The fpComboBox control is an enhanced version of the standard Visual Basic ComboBox.  It supports multiple columns, multiple selections of data, sequential sorting of columns, bound data, 3-D appearance of headings and selections, customized alignment for columns and headers, and scrollbars.  The Aware/VBX fpComboBox also provides virtual data management, breaking the 64K barrier when bound to a database.

Figure 3.9 Multi-Column ComboBox Sorted by File Name

FileName	AWARECB.VBX

Discussion

A combobox can be set to one of three styles with the Style property.  The Dropdown combobox (Style = 0) includes a listbox portion and an edit (or static) area, allowing the user to select from the list or type in the edit area.  The Simple combobox (Style = 1) includes an edit portion and a list that is always displayed, and the user can select from the list or type in the edit area.  The Dropdown Listbox combobox (Style = 2) contains a list portion and a static field, allowing selection only from the dropdown list.

MultiColumn ComboBoxes

You can set a combobox with multiple columns with the Columns property.  When the Columns property is greater than 0, you can customize the display for each column with the Col properties rather than with the general control properties.  You must specify the column with the Col property before setting the other Col properties.

Sorting Column Data

You can sort data in a combobox column as desired with the Sorted (for single column comboboxes) or ColSorted (for multiple column comboboxes) properties.  Specify the sequence for sorting multiple columns in relation to each other with the ColSortSequence property.

Binding the Edit Portion

Bind the edit portion of the combobox using the standard DataField and DataSource properties.

List Portion of the ComboBox

Binding the List Portion

The list portion of a combobox can be bound to a data field independently of the edit portion of the control.  Use the DataSourceList property to specify the data control and the DataFieldList property to specify the field.  Use the ColDataField property to bind to multiple columns.  Specify the data field type with the FieldType property in a single column combobox and with the ColFieldType property in a multiple column combobox.  When you do not specify the field type, the field defaults to the Text data type.

Retrieving and Setting List Items

You can also set or retrieve the index of the row from the list portion to display in the edit portion, and determine the number of rows that are in the list portion with the ListCount and ListIndex properties, respectively.  Use the TopIndex property to retrieve the index of the topmost visible item in the list portion of the combobox.

Use the List property to access list items from the single column combobox.  Unlike the Visual Basic List property, which is an array data type, the Aware List property is not.  Therefore you must specify a row with the Row property in order to set or retrieve the item in the list.  Use the ColList property to access list items in a multiple column combobox.

Adding and Removing ComboBox Items

You can add and remove items from the combobox with the AddItem and RemoveItem methods.  These methods function similarly to the Visual Basic AddItem and RemoveItem methods.  For more information on the AddItem and RemoveItem methods, refer to Visual Basics Language Reference.

Customizing ComboBox Display

The fpComboBox control allows you to set colors, widths, and styles for the lines, selection and headers independently of each other.

Use the Line properties to customize the lines in the list portion of the combobox.  Use the LineStyleH and LineStyleV properties to display vertical and/or horizontal lines or neither, and to determine whether to use a 3-D appearance for the lines.  Use the LineHighlightColor, LineShadowColor, and LineWidth properties to further customize the 3-D line display.  For details on creating a 3-D appearance see the section Creating a 3-D Appearance in Chapter 2.

The Header properties customize the display of column headers  Set the background and text colors with the HeaderBackColor and HeaderForeColor properties.  Selections can also be set with contrasting background and text colors from the rest of the list as desired using the SelBackColor and SelForeColor properties.

Set the 3-D appearance of the text of headers and selections with the Header3D and Selection3D properties, respectively.  You can contrast the 3-D appearance of the headers and selections with the 3-D line style properties to make them stand out from the list.  For details see the section Setting 3-D Text in Chapter 2.

Virtual Data Management

The Aware/VBX fpComboBox control breaks the 64K barrier and optimizes data retrieval by providing virtual data management.  Virtual data management loads data as needed, rather than retrieving the data as a whole.

Set the VirtualMode property to True to turn on virtual mode.  When virtual mode is on, the database is read into the control in memory manageable portions.  Use the VirtualScrollMax property to set the scroll range.

fpComboBox Unique Properties

Col

Sets or retrieves the desired column in an fpComboBox control.

ColAlignH, ColHeaderAlignH

Determines the horizontal alignment of a specified column and the header for a specified column, respectively.

ColDataField

Sets or retrieves the data field of the specified bound column in an fpComboBox control.

ColFieldType

Sets the data field type of a specific column in the fpComboBox.

ColFormat

Sets or returns the format string used for data display in a column.

ColHeaderText, ColText

Sets or retrieves the header text for the specified column and the text for the specified column in an fpComboBox respectively.

ColHide

Determines whether the specified column is displayed in an fpComboBox control.

ColList

Returns the specified row and column text from the list portion of an fpComboBox control.

ColSorted

Determines the method by which data in a specific column is sorted: no sorting, ascending, or descending.

ColSortSequence

Determines the order in which a specified column in an fpComboBox control is sorted, if at all.

ColumnEdit

Sets or retrieves the specified column to display in the editable or static portion of the control.

Columns

Sets or retrieves the number of columns used in an fpComboBox control.

ColumnSeparatorChar

Sets the character used to separate column text in a multiple column combobox.  Any ASCII character supported by Microsoft Windows may be used.  The default separator character is the tab, designated by Chr$(9).

ColumnWidthScale

Determines the units of measurement for calculating the width of the specified column.

ColWidth

Sets or retrieves the width of the specified column in an fpComboBox control.

ComboListWidth

Sets or retrieves width of the list dropped down in an fpComboBox.  If this width is less than the sum of the column widths set for display, the far right column(s) will be truncated as needed.  If this width is more than the sum of the column widths set for display, there will be extra space displayed at the end of the last column.

DataFieldList

Sets or retrieves the data field of the list portion of a combobox.

DataSourceList

Binds a data field to the list portion of the combobox.

FieldType

Sets the data field type of the fpComboBox.

HeaderBackColor, HeaderForeColor

Sets or retrieves the background and the text color of the header for the specified column in an fpComboBox, respectively.

HeaderFontBold, HeaderFontItalic, HeaderFontName, HeaderFontSize, HeaderFontStrike, HeaderFontUnder

Sets or retrieves the font properties for the header text in the control.

HeaderHeight

Sets or retrieves the height of the header in an fpComboBox.  When the HeaderHeight is set to 0 (the default value), the header height automatically adjusts to fit the size of the font.

HeaderShow

Determines whether to display the column headers in an fpComboBox.

Header3DStyle, Header3DWidth

Sets or retrieves the 3-D appearance of the header borders in an fpComboBox.

Header3DText, Header3DTextHighlightColor, Header3DTextShadowColor, Header3DTextOffset

Sets the 3-D appearance of the header text in the control.

LineColor

Sets or retrieves the color of the lines in the list portion of the control.

LineHighlightColor, LineShadowColor

Sets or retrieves the 3-D highlight and shadow colors for the border lines in an fpComboBox.

LineStyleH, LineStyleV

Sets or retrieves the 3-D appearance of the border lines in an fpComboBox control.

LineWidth

Sets or retrieves the width of the solid, shadow, and highlight lines in an fpComboBox control.

List

Sets or retrieves the text from the row specified by the Row property in an fpComboBox control.

List3DText, List3DTextHighlightColor, List3DTextShadowColor, List3DTextOffset

Sets the 3-D appearance of the text in the list portion of the control.

ListCount

Returns the number of rows in the listbox portion of an fpComboBox control.

ListIndex

Sets or retrieves the index of the currently selected row.  Returns a -1 if there are no rows in the control, or if the user has entered text.

MaxDrop

Determines the maximum number of rows displayed in an fpComboBox when clicked on.  Note that the header row is considered as one of the rows, therefore, you must include it in the row count for display purposes.

Row

Sets or retrieves the desired row in an fpComboBox control.

ScrollBars

Determines whether to display horizontal and or vertical scroll bars in an fpComboBox control.

Sel3DHighlightColor, Sel3DShadowColor, Sel3DStyle, Sel3DWidth

Sets the 3-D appearance of the selection(s) in the list portion of the control.

SelBackColor, SelForeColor

Sets or retrieves the background color and the text color of the selection in an fpComboBox.

SelDrawFocusRect

Determines whether to draw the dotted rectangle around a selected entry in an fpComboBox control.

Sorted

Determines the sorting method in a single column combobox control.

Style

Determines the style of the combobox in an fpCombobox control.

TopIndex

Sets or retrieves the index of the topmost visible row appearing in an fpCombobox control.

VirtualMode, VirtualScrollMax

Informs the control to turn on Virtual Mode and sets the scroll range.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* BackColor	FontStrikeThru	** List3DTextOffset
** Col	FontUnderline	** List3DTextShadowColor
** ColAlignH	ForeColor	** ListCount
** ColDataField	** HeaderBackColor	** ListIndex
** ColFieldType	** HeaderFontBold	** MaxDrop
** ColFormat	** HeaderFontItalic	MousePointer
** ColHeaderAlignH	** HeaderFontName	Name
** ColHeaderText	** HeaderFontSize	Parent
** ColHide	** HeaderFontStrike	** Row
** ColList	** HeaderFontUnder	** ScrollBars
** ColSorted	** HeaderForeColor	** Sel3DHighlightColor
** ColSortSequence	** HeaderHeight	** Sel3DShadowColor
** ColText	** HeaderShow	** Sel3DStyle
** ColumnEdit	** Header3DStyle	** Sel3DWidth
** Columns	** Header3DText	** SelBackColor
** ColumnSeparatorChar	** Header3DTextHighlightColor	** SelDrawFocusRect
** ColumnWidthScale	** Header3DTextOffset	** SelForeColor
** ColWidth	** Header3DTextShadowColor	* SelLength
** ComboListWidth	** Header3DWidth	* SelStart
DataChanged	Height	* SelText
DataField	HelpContextID	Sorted
** DataFieldList	Index	** Style
DataSource	Left	TabIndex
** DataSourceList	** LineColor	TabStop
DragIcon	** LineHighlightColor	Text
DragMode	** LineShadowColor	Top
Enabled	** LineStyleH	** TopIndex
** FieldType	** LineStyleV	** VirtualMode
FontBold	** LineWidth	** VirtualScrollMax
FontItalic	** List	Visible
FontName	** List3DText	Width
FontSize	** List3DTextHighlightColor
Events
Change	DragOver	KeyUp
Click	** DropDown	LostFocus
** CloseUp	GotFocus	** SelChange
DblClick	KeyDown
DragDrop	KeyPress
Methods
AddItem	Move	SetFocus
Clear	Refresh	ZOrder
Drag	RemoveItem


fpCurrency Control

Description

The fpCurrency control is a floating point edit control used to display and edit monetary data.  It offers flexible formats for input and output of different types of currency, and provides enhanced properties in addition to most of the standard Visual Basic and Aware/VBX properties.

Figure 3.10	A Typical fpCurrency Control

FileName	AWARE.VBX

Discussion

The fpCurrency control customizes both the data entry style and the display format of monetary data.  International setting defaults are available for most properties in the fpCurrency control, allowing for international marketing of your application.

If the developer does not designate the format of the data in the fpCurrency control, the monetary format of the data defaults to the Windows International Settings established in the Windows Control Panel.  For more information see the section International Settings in Chapter 2 of this manual.

fpCurrency Unique Properties

CurrencyDecimalPlaces

Sets the number of decimal places displayed in the control.  Values maintain precision until edited.

CurrencyNegFormat

Sets the negative format for the Currency control.  Eleven (11) settings may be assigned.  See the CurrencyNegFormat property description for specific settings.

CurrencyPlacement

Sets the placement of the currency symbol in relation to the numeric value.  Four (4) settings may be assigned.  See the CurrencyNegFormat property description for specific settings.

CurrencySymbol

Specifies the character to be used as the currency symbol in an fpCurrency control.  See the CurrencyNegFormat property description for details.

DecimalPoint

Sets the character used as the decimal point in an fpCurrency control.

FixedPoint

Determines whether to display placeholding zeros to the right of the decimal point in an fpCurrency control.

IncDec

When the ButtonDefaultAction property is set to True, the IncDec property in an fpCurrency control determines the amount the numeric value will increment when the caret is positioned to the right of the decimal point.

IncInt

When the ButtonDefaultAction property is set to True, the IncInt property in an fpCurrency control determines the amount the numeric value will increment when the caret is positioned to the left of the decimal point.

LeadZero

Determines whether to display a leading zero for numeric values less than 1.0 but greater than -1.0 in an fpCurrency control.

MaxValue, MinValue

Sets or returns the maximum or minimum user-entered currency in an fpCurrency control.

NegToggle

Allows toggling between a negative and a positive currency value in an fpCurrency control.

Separator

Sets or returns the character used to separate thousands in currency values with more than three digits in an fpCurrency control.

UnFmtText

Sets or retrieves the currency value without formatting characters in an fpCurrency control:  Separator characters are removed, and the value is returned with the decimal point character set according to the system configuration.

UseSeparator

Allows/Prevents use of the selected currency separator as set by the Separator property in an fpCurrency control.

Value

Sets or retrieves the numeric representation of data in a field in the format of its respective control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	DragMode	* OnFocusAlignV
* Action	* DropShadowColor	* OnFocusInvert3D
* AlignTextH	* DropShadowWidth	* OnFocusNoSelect
* AlignTextV	Enabled	* OnFocusShadow
* AllowNull	** FixedPoint	* OnFocusPosition
* AutoAdvance	FontBold	Parent
* AutoBeep	FontItalic	* Redraw
BackColor	FontName	* SelLength
* BorderColor	FontSize	* SelStart
* BorderGrayAreaColor	FontStrikeThru	* SelText
* BorderStyle	FontUnderline	** Separator
* BorderWidth	ForeColor	TabIndex
* ButtonDefaultAction	Height	TabStop
* ButtonDisable	* HelpContextID	Tag
* ButtonHide	* HideSelection	* Text
* ButtonIncrement	* hWnd	* ThreeDFrameWidth
* ButtonIndex	** IncDec	* ThreeDInsideHighlightColor
* ButtonMax	** IncInt	* ThreeDInsideShadowColor
* ButtonMin	Index	* ThreeDInsideStyle
* ButtonStyle	* InvalidColor	* ThreeDInsideWidth
* ButtonWidth	* InvalidOption	* ThreeDOutsideHighlightColor
* ButtonWrap	* IsNull	* ThreeDOutsideShadowColor
* CaretInsert	* IsValid	* ThreeDOutsideStyle
* CaretOverWrite	** LeadZero	* ThreeDOutsideWidth
* CharPositionLeft	Left	* ThreeDText
* CharPositionRight	* MarginBottom	* ThreeDTextHighlightColor
* ControlType	* MarginLeft	* ThreeDTextShadowColor
** CurrencyDecimalPlaces	* MarginRight	* ThreeDTextOffset
** CurrencyNegFormat	* MarginTop	Top
** CurrencyPlacement	** MaxValue	** UnFmtText
** CurrencySymbol	** MinValue	* UserEntry
* CurrentPosition	MousePointer	** UseSeparator
DataChanged	Name	** Value
DataField	** NegToggle	Visible
DataSource	* NoSpecialKeys	Width
** DecimalPoint	* NullColor
DragIcon	* OnFocusAlignH
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpDateTime Control

Description

The fpDateTime control is a formatted edit control offering flexible formats for input and output of dates and times, and provides enhanced properties in addition to most of the standard Visual Basic and Aware/VBX properties.

Figure 3.11	A Typical fpDateTime Control

File Name	AWARE.VBX

Discussion

The fpDateTime control allows a developer to customize data entry style and display format of dates and/or times.  A range of user allowed dates and/or times can be enforced, and the date and time can be retrieved or set separately.

Formatting and Calculating Dates and Times

You can display a date only, a time only, or a combination of the two by setting the DateTimeFormat property.  If you want to create a unique date time format, set the DateTimeFormat property to 5 (UserDefined), set the UserEntry property to 1 (FreeFormat), and then use the UserDefinedFormat property to set the format string you wish to use for the date and/or time.  The user defined setting displays most standard formats, eliminating the need for Separator, LeadZero, and UseSeparator properties.

Note:  If the user does not designate the format of the data in the fpDateTime control, the format of the data will default to the Windows International Settings established in the Windows Control Panel.  For more information see the section International Settings in Chapter 2 of this manual.

After you have designated a format for the date and/or time, data entry into the control need not rigidly conform to the format.  The fpDateTime control fills in missing values or cuts out extra values (such as lead zeros) to compute a valid entry for the control.  You can use the DateCalcMethod property setting to determine a method for calculating missing date values in a control.

Range Setting and Validation

You can limit the range of user entered dates and/or times in an fpDateTime control by setting the DateMax, DateMin, TimeMax, and TimeMin property values.  When these range values are used and the UserEntry property is set to 0 (Formatted), the control does not use strict, character by character validation on the data.  Instead, data is not validated until the user attemps to exit the control.  This prevents the control from switching into unformatted UserEntry mode when the user has only entered part of the data into the control.  For more information on validation of data, see the section Handling Invalid Data in Chapter 2 of this manual.

Setting and Retrieval of Dates and Times

Dates and/or times can be set or retrieved programmatically using the Text, UnfmtText, Value, DateValue, TimeValue, Day, Hour, Min, Month, Sec and Year properties.  The UnfmtText property returns both the date and time in a consistent format:  YYYYMMDD HHMMSS.  The Value property returns the datae and time using Visual Basics double format.

Use the DateValue property when you want to set or retrieve a date only.  The format for the DateValue property is YYYYDDMM and is compatible with the fpCalendar control.

Use the TimeValue property when you want to set or retrieve a time only.  The format for the TimeValue is HH:MM:SS and is compatible with the fpClock control.  Use the Day, Hour, Min, Month, Sec and Year properties when you only want to set or retrieve a part of the date and/or time.

If you want to retrieve the date and/or time as a formatted string, use the Text property.

fpDateTime Unique Properties

DateCalcMethod

Sets or returns the method for calculating missing date and time values.

DateDefault, TimeDefault

Sets or returns the date and time formats when the DateCalcMethod property is set to 1 (User Defined).

DateMax, DateMin

Sets or returns the maximum or minimum user-entered date in the control.  The format for assigning a date is YYYYMMDD.

DateTimeFormat

Sets or returns the style of the date and/or time displayed in the field.  Five international settings and one user defined format setting are available for customizing formats of the date and/or time.

DateValue

Returns the date in an fpDateTime control in the format YYYYMMDD.  This format is compatible with the fpCalendar control.

Day, Month, Year

Returns the day, month and year of the date in an fpDateTime control.

Hour, Min, Sec

Returns the hours, minutes and seconds of the time in an fpDateTime control.

TimeMax, TimeMin

Sets or returns the maximum or minimum user-entered time in the control.  The format for assigning a date is HHMMSS.

TimeString1159, TimeString2359

Sets the string of characters to be appended to the time string to designate PM (evening hours and 24 hour clock) or AM (morning hours).

TimeStyle

Sets or returns the method for calculating and displaying the time in the control.

TimeValue

Returns the time in an fpDateTime control in the format HH:MM:SS.  This format is compatible with the fpClock control).

UnFmtText

Sets or retrieves the value of the date and time without formatting characters in the format YYYYMMDD HHMMSS.

Note:  The date and time format for the UnFmtText property was chosen to provide consistent return values independent of the international settings.

UserDefinedFormat

Allows you to define your own format for displaying the time and/or date, including the separator characters.

Value

Sets or retrieves the numeric representation of data in a field in the format of its respective control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	DragMode	* Redraw
* Action	* DropShadowColor	** Sec
* AlignTextH	* DropShadowWidth	* SelLength
* AlignTextV	Enabled	* SelStart
* AllowNull	FontBold	* SelText
* AutoAdvance	FontItalic	TabIndex
* AutoBeep	FontName	TabStop
BackColor	FontSize	Tag
* BorderColor	FontStrikeThru	* Text
* BorderGrayAreaColor	FontUnderline	* ThreeDFrameWidth
* BorderStyle	ForeColor	* ThreeDInsideHighlightColor
* BorderWidth	Height	* ThreeDInsideShadowColor
* ButtonDefaultAction	* HelpContextID	* ThreeDInsideStyle
* ButtonDisable	* HideSelection	* ThreeDInsideWidth
* ButtonHide	** Hour	* ThreeDOutsideHighlightColor
* ButtonIncrement	* hWnd	* ThreeDOutsideShadowColor
* ButtonIndex	Index	* ThreeDOutsideStyle
* ButtonMax	* InvalidColor	* ThreeDOutsideWidth
* ButtonMin	* InvalidOption	* ThreeDText
* ButtonStyle	* IsNull	* ThreeDTextHighlightColor
* ButtonWidth	* IsValid	* ThreeDTextShadowColor
* ButtonWrap	Left	* ThreeDTextOffset
* CaretInsert	* MarginBottom	** TimeDefault
* CaretOverWrite	* MarginLeft	** TimeMax
* CharPositionLeft	* MarginRight	** TimeMin
* CharPositionRight	* MarginTop	** TimeString1159
* ControlType	** Min	** TimeString2359
* CurrentPosition	** Month	** TimeStyle
DataChanged	MousePointer	** TimeValue
DataField	Name	Top
DataSource	* NoSpecialKeys	** UnFmtText
** DateCalcMethod	* NullColor	** UserDefinedFormat
** DateDefault	* OnFocusAlignH	* UserEntry
** DateMax	* OnFocusAlignV	** Value
** DateMin	* OnFocusInvert3D	Visible
** DateTimeFormat	* OnFocusNoSelect	Width
** DateValue	* OnFocusPosition	** Year
** Day	* OnFocusShadow
DragIcon	Parent
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpDoubleSingle Control

Description

The fpDoubleSingle control is a formatted floating point edit control that supports several common formats.

Figure 3.12	A Typical fpDoubleSingle Control

File Name	AWARE.VBX

Discussion

The fpDoubleSingle control is designed to provide validated entry of floating point numbers.  The entry of any characters other than numbers or the decimal point is automatically locked out by this control.  Minimum or maximum values may be specified.

If the developer does not designate the format of the data in the fpDoubleSingle control, the format of the data will default to the Windows International Settings established in the Windows Control Panel.  For more information see the section International Settings in Chapter 2 of this manual.

fpDoubleSingle Unique Properties

DecimalPlaces

Sets the number of decimal places displayed in an fpDoubleSingle control.  Values maintain precision until edited.

DecimalPoint

Sets the character used as the decimal point in a floating point control.

FixedPoint

Determines whether to display placeholding zeros to the right of the decimal point in a floating point control.

IncDec

When the ButtonDefaultAction property is set to True in an fpDoubleSingle control, the IncDec property determines the amount the numeric value will increment when the caret is positioned to the right of the decimal point.

IncInt

When the ButtonDefaultAction property is set to True, the IncInt property in an fpDoubleSingle control determines the amount the numeric value will increment when the caret is positioned to the left of the decimal point.

LeadZero

Determines whether to display a leading zero for numeric values less than 1.0 but greater than -1.0 in an fpDoubleSingle control.

MaxValue, MinValue

Sets or returns the maximum or minimum user-entered value in an fpDoubleSingle control.

NegFormat

Sets the negative format in an fpDoubleSingle control.  Three settings may be assigned.  See the NegFormat property description for specific settings.

NegToggle

Allows toggling between a negative and a positive numeric value in an fpDoubleSingle control.

Separator

Sets or returns the character used to separate thousands in numeric values with more than three digits in an fpDoubleSingle control.

UnFmtText

Sets or retrieves the numeric value without formatting characters in an fpDoubleSingle control:  Separator characters are removed, and the value is returned with the decimal point character set according to the system configuration.

UseSeparator

Allows/Prevents use of the selected thousands separator as set by the Separator property in an fpDoubleSingle control.

UserEntry

Allows the developer to select how data will be accepted by an fpDoubleSingle control.

Value

Sets or retrieves the numeric representation of data in a field in the format of its respective control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	* DropShadowWidth	* OnFocusAlignV
* Action	Enabled	* OnFocusInvert3D
* AlignTextH	** FixedPoint	* OnFocusNoSelect
* AlignTextV	FontBold	* OnFocusPosition
* AllowNull	FontItalic	* OnFocusShadow
* AutoAdvance	FontName	Parent
* AutoBeep	FontSize	* Redraw
BackColor	FontStrikeThru	* SelLength
* BorderColor	FontUnderline	* SelStart
* BorderGrayAreaColor	ForeColor	* SelText
* BorderStyle	Height	* Separator
* BorderWidth	* HelpContextID	TabIndex
* ButtonDefaultAction	* HideSelection	TabStop
* ButtonDisable	* hWnd	Tag
* ButtonHide	Index	* Text
* ButtonIncrement	* IncInt	* ThreeDFrameWidth
* ButtonIndex	* IncDec	* ThreeDInsideHighlightColor
* ButtonMax	* InvalidColor	* ThreeDInsideShadowColor
* ButtonMin	* InvalidOption	* ThreeDInsideStyle
* ButtonStyle	* IsNull	* ThreeDInsideWidth
* ButtonWidth	* IsValid	* ThreeDOutsideHighlightColor
* ButtonWrap	* LeadZero	* ThreeDOutsideShadowColor
* CaretInsert	Left	* ThreeDOutsideStyle
* CaretOverWrite	* MarginBottom	* ThreeDOutsideWidth
* CharPositionLeft	* MarginLeft	* ThreeDText
* CharPositionRight	* MarginRight	* ThreeDTextHighlightColor
* ControlType	* MarginTop	* ThreeDTextShadowColor
* CurrentPosition	** MaxValue	* ThreeDTextOffset
DataChanged	** MinValue	Top
DataField	MousePointer	** UnFmtText
DataSource	Name	* UserEntry
** DecimalPlaces	** NegFormat	** UseSeparator
** DecimalPoint	** NegToggle	** Value
DragIcon	* NoSpecialKeys	Visible
DragMode	* NullColor	Width
* DropShadowColor	* OnFocusAlignH
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpListBox Control

Description

The fpListBox control is an enhanced version of the Visual Basic List Box Control.  It supports all of the Visual Basic properties, events, and methods, as well as supporting multiple columns, bound data, 3-D appearance of headings, customized alignment for columns and headers, and scrollbars.  The Aware/VBX fpListBox also provides virtual data management, breaking the 64K barrier when bound to a database.

Figure 3.13	A Typical fpListBox

File Name	AWARELB.VBX

Discussion

The fpListBox control can be used to display and bind single column or multiple column data lists.  Use the fpListbox when you want to provide single or multiple data selection and viewing from a list.

ListBox Features

You can set a listbox with multiple columns with the Columns property.  When the Columns property is greater than 0, you can set the display for each column with the Col properties rather than with the general control properties.

Setting Column Display

You can customize the data display for each column in a multiple column listbox independently by using the Col properties.  You must specify the column with the Col property before setting the other Col properties.

You can also set the listbox to wrap a single column of data into snaking columns rather than displaying the items vertically.  Set the WrapList property to True to access this feature.  You can use the WrapList property with single column listboxes only.

Sorting Column Data

You can sort data in a listbox as desired with the Sorted (for single column listboxes) or ColSorted (for multiple column listboxes) properties.  Specify the sequence for sorting multiple columns in relation to each other with the ColSortSequence property.

Binding the ListBox

The DataField and FieldType properties set the data field and the field type in a single column listbox.  When using a multiple column listbox, you bind each column to a different data field by specifying the column with the Col property and then setting the ColDataField and ColFieldType properties.  When you do not specify the field type, the field defaults to the Text data type. .

Retrieving and Setting List Items

You can set or retrieve the index of the row selected from the list and determine the number of rows in the listbox with the ListCount and ListIndex properties, respectively.  Use the TopIndex property to retrieve the index of the topmost visible item in the list.

Use the List property to access list items from the single column listbox.  Unlike the Visual Basic List property, which is an array data type, the Aware List property is not.  Therefore you must specify a row with the Row property in order to set or retrieve the item in the list.  Use the ColList property to access list items in a multiple column listbox.

Selection properties are also provided for retrieving and setting selected items from a list in an fpListBox control.  The Selected property sets or returns the item(s) currently selected in the listbox.  The SelMax and SelCount properties set or retrieve the maximum and actual number of rows in the selection, respectively.  The MultiSelect property determines how items in the list are selected.

Customizing ListBox Display

The fpListBox control allows you to set colors, widths, and styles for the lines, selection and headers independently of each other.

Use the Line properties to customize the lines in the listbox.  Use the LineStyleH and LineStyleV properties to display vertical and/or horizontal lines or neither, and to determine whether to use a 3-D appearance for the lines.  Use the LineHighlightColor, LineShadowColor, and LineWidth properties to further customize the 3-D line display.  For details on creating a 3-D appearance see the section Creating a 3-D Appearance in Chapter 2.

The Header properties customize the display of column headers  Set the background and text colors with the HeaderBackColor and HeaderForeColor properties.  Selections can also be set with contrasting background and text colors from the rest of the list as desired using the SelBackColor and SelForeColor properties.

Set the 3-D appearance of the text of headers and selections with the Header3D and Selection3D properties, respectively.  You can contrast the 3-D appearance of the headers and selections with the 3-D line style properties to make them stand out from the list.  For details see the section Setting 3-D Text in Chapter 2.

Adding and Removing ListBox Items

You can add and remove items from the listbox with the AddItem and RemoveItem methods.  These methods function similarly to the Visual Basic AddItem and RemoveItem methods.  For more information on the AddItem and RemoveItem methods, refer to Visual Basics Language Reference.

Virtual Data Management

The Aware/VBX fpListBox control breaks the 64K barrier and optimizes data retrieval by providing virtual data management.  Virtual data management loads data as needed, rather than retrieving the data as a whole.

Set the VirtualMode property to True to turn on virtual mode.  When virtual mode is on, the database is read into the control in memory manageable portions.  Use the VirtualScrollMax property to set the scroll range.

fpListBox Unique Properties

Col

Sets or retrieves the desired column in an fpListBox control.

ColAlignH, ColHeaderAlignH

Determines the horizontal alignment of a specified column and the header for a specified column, respectively.

ColDataField

Sets or retrieves the datafield of the specified bound column in an fpListBox control.

ColFieldType

Sets or retrieves the type of bound data for a specified column in multiple column listboxes.

ColFormat

Sets or returns the format string used for data display in a column.

ColHeaderText

Sets or retrieves the header text for the specified column in an fpListBox control.

ColHide

Determines whether the specified column is displayed in an fpListBox control.

ColList

Returns the specified row and column text from an fpListBox control.

ColSorted

Determines the method by which data in a specific column is sorted: no sorting, ascending, or descending.

ColSortSequence

Determines the order in which a specified column in an fpListBox control is sorted, if at all.

Columns

Determines the number of columns desired in an fpListBox control.

ColumnSeparatorChar

Sets or returns the character used to separate string data into columns (applied to all columns) in an fpListBox control.

ColumnWidthScale

Sets the measurement scale used to set column widths in an fpListBox control.

ColWidth

Sets the width of a column in an fpListBox control.

FieldType

Sets or retrieves the type of bound data expected in a single column listbox.

HeaderBackColor, HeaderForeColor

Sets or retrieves the background and text color of the header, respectively, in an fpListBox control.

HeaderFontBold, HeaderFontItalic, HeaderFontName, HeaderFontSize, HeaderFontStrike, HeaderFontUnder

Set or retrieve the font properties for the header text in an fpListBox control.

HeaderHeight

Sets or retrieves the height of the header in an fpListBox control.

HeaderShow

Determines whether to show the header in an fpListBox control.

Header3DStyle, Header3DWidth

Sets or retrieves the 3-D style of the header in an fpListBox control.

Header3DText, Header3DTextHighlightColor, Header3DTextShadowColor, Header3DTextOffset

Sets the 3-D appearance of the header text in an fpListBox control.

LineColor

Sets the line color in an fpListBox control.

LineHighlightColor, LineShadowColor

Sets the line highlight and shadow colors, respectively, for an fpListBox control.

LineStyleH, LineStyleV

Sets the 3-D style of the horizontal and vertical lines, respectively, in an fpListBox control.

LineWidth

Sets or retrieves the width of the solid, shadow, and highlight lines in an fpListBox control.

List

Retrieves text from the selected row in an fpListBox control.

List3DText, List3DTextHighlightColor, List3DTextShadowColor, List3DTextOffset

Sets the 3-D appearance of the text in the list portion of the control.

ListCount

Sets or returns the number of rows of data in the listbox portion in an fpListBox control.

ListIndex

Sets or retrieves the index of the currently selected row.  Returns a -1 if there are no rows in the control, or if the user has entered text.

MultiSelect

Specifies whether a user can make multiple item selections in an fpListBox control and how the selections can be made.

Row

Sets or returns the desired row in an fpListBox control.

ScrollBars

Specifies whether an fpListBox control uses horizontal or vertical scroll bars.

Sel3DHighlightColor, Sel3DShadowColor, Sel3DStyle, Sel3DWidth

Set the 3-D appearance of the selection(s) in the list portion of the control.

SelBackColor, SelForeColor

Sets or retrieves the background and text color of the selection(s), respectively, in an fpListBox control.

SelCount

Returns the number of selected items in an fpListBox control.

SelDrawFocusRect

Determines whether to draw the dotted rectangle around a selected entry in an fpListBox control.

Selected

Determines the selection status of an item in an fpListBox control.

SelMax

Determines the maximum number of rows that may be selected in an fpListBox control.

TopIndex

Determines the index of the topmost visible row in an fpListBox control.

VirtualMode, VirtualScrollMax

Informs the control to turn on Virtual Mode and sets the scroll range.

WrapList

Allows or prevents wrapping of a single column of data in an fpListBox control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* BackColor	** HeaderBackColor	** ListCount
** Col	** HeaderFontBold	** ListIndex
** ColAlignH	** HeaderFontItalic	MousePointer
** ColDataField	** HeaderFontName	** MultiSelect
** ColFieldType	** HeaderFontSize	Name
** ColFormat	** HeaderFontStrike	Parent
** ColHeaderAlignH	** HeaderFontUnder	** Row
** ColHeaderText	** HeaderForeColor	** ScrollBars
** ColHide	** HeaderHeight	** Sel3DHighlightColor
** ColList	** HeaderShow	** Sel3DShadowColor
** ColSorted	** Header3DStyle	** Sel3DStyle
** ColSortSequence	** Header3DText	** Sel3DWidth
** Columns	** Header3DTextHighlightColor	** SelBackColor
** ColumnSeparatorChar	** Header3DTextOffset	** SelCount
** ColumnWidthScale	** Header3DTextShadowColor	** SelDrawFocusRect
** ColWidth	** Header3DWidth	** Selected
DataChanged	Height	** SelForeColor
DataField	HelpContextID	** SelMax
DataSource	Left	Sorted
DragIcon	** LineColor	TabIndex
DragMode	** LineHighlightColor	TabStop
Enabled	** LineShadowColor	Tag
** FieldType	** LineStyleH	Text
FontBold	** LineStyleV	Top
FontItalic	** LineWidth	** TopIndex
FontName	** List	** VirtualMode
FontSize	** List3DText	** VirtualScrollMax
FontStrikeThru	** List3DTextHighlightColor	Visible
FontUnderline	** List3DTextOffset	Width
ForeColor	** List3DTextShadowColor	** WrapList
Events
Click	KeyDown	MouseMove
DblClick	KeyPress	MouseUp
DragDrop	KeyUp	** SelChange
DragOver	LostFocus
GotFocus	MouseDown
Methods
AddItem	Move	SetFocus
Clear	Refresh	ZOrder
Drag	RemoveItem


fpLongInteger Control

Description

The fpLongInteger control is a formatted integer edit control that supports several common formats.

Figure 3.14	A Typical fpLongInteger Control

File Name	AWARE.VBX

Discussion

The fpLongInteger control is designed to provide validated entry of long and integer values.  The entry of any characters other than numbers is automatically locked out by this control.  Minimum or maximum values may be specified.

fpLongInteger Unique Properties

IncInt

When the ButtonDefaultAction property is set to True in an fpLongInteger control, the IncInt property determines the amount the numeric value will increment.

MaxValue, MinValue

Sets or returns the maximum or minimum user-entered value in an fpLongInteger control.

NegFormat

Sets the negative format for an fpLongInteger control.  Three settings may be assigned.  See the NegFormat property description for specific settings.

NegToggle

Allows toggling between a negative and a positive numeric value in an fpLongInteger control.

Separator

Sets or returns the character used to separate thousands in numeric values with more than three digits in an fpLongInteger control.

UnFmtText

Sets or retrieves the numeric value without formatting characters in an fpLongInteger control.  Separator characters are removed, and the value is returned with the decimal point character set according to the system configuration.

UserEntry

Allows the developer to select how data will be accepted by the control in an fpLongInteger control.

UseSeparator

Allows/Prevents use of the selected thousands separator as set by the Separator property in an fpLongInteger control.

Value

Sets or retrieves the numeric representation of data in a field in the format of its respective control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	* DropShadowWidth	* OnFocusInvert3D
* Action	Enabled	* OnFocusNoSelect
* AlignTextH	FontBold	* OnFocusPosition
* AlignTextV	FontItalic	* OnFocusShadow
* AllowNull	FontName	Parent
* AutoAdvance	FontSize	* Redraw
* AutoBeep	FontStrikeThru	* SelLength
BackColor	FontUnderline	* SelStart
* BorderColor	ForeColor	* SelText
* BorderGrayAreaColor	Height	* Separator
* BorderStyle	* HelpContextID	TabIndex
* BorderWidth	* HideSelection	TabStop
* ButtonDefaultAction	* hWnd	Tag
* ButtonDisable	Index	* Text
* ButtonHide	* IncInt	* ThreeDFrameWidth
* ButtonIncrement	* InvalidColor	* ThreeDInsideHighlightColor
* ButtonIndex	* InvalidOption	* ThreeDInsideShadowColor
* ButtonMax	* IsNull	* ThreeDInsideStyle
* ButtonMin	* IsValid	* ThreeDInsideWidth
* ButtonStyle	Left	* ThreeDOutsideHighlightColor
* ButtonWidth	* MarginBottom	* ThreeDOutsideShadowColor
* ButtonWrap	* MarginLeft	* ThreeDOutsideStyle
* CaretInsert	* MarginRight	* ThreeDOutsideWidth
* CaretOverWrite	* MarginTop	* ThreeDText
* CharPositionLeft	** MaxValue	* ThreeDTextHighlightColor
* CharPositionRight	** MinValue	* ThreeDTextShadowColor
* ControlType	MousePointer	* ThreeDTextOffset
* CurrentPosition	Name	Top
DataChanged	** NegFormat	** UnFmtText
DataField	** NegToggle	* UserEntry
DataSource	* NoSpecialKeys	** UseSeparator
DragIcon	* NullColor	** Value
DragMode	* OnFocusAlignH	Visible
* DropShadowColor	* OnFocusAlignV	Width
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpMask Control

Description

The fpMask control is a formatted edit control providing restricted data input and formatted data output.  The data being entered or displayed is formatted using the mask properties to:

1)    Limit the characters accepted into the control and

2)    Visually cue the user to the data type required in the control.

Figure 3.15	A Typical fpMask Control

File Name	AWARE.VBX

Discussion

Both the fpMask Control and the fpText Control display information entered at design time, entered by the user, or assigned to the control in code at run time.

The fpMask control differs from the fpText control, however, in that its properties allow the developer to define input masks to restrict the data which can be entered into the control.  Once defined, these input masks act as a code to the control, telling it which type of character is allowed for each character position in the control.  If the character typed in does not match the mask character which has been assigned for the position, the control generates a UserError event.

Defining Input Masks

The developer defines the set of characters which will be accepted for each character position, thus preventing invalid characters from being entered.  The character position may be designated as a placeholder, which signifies a specific data type for that position, or as a literal character, which provides the user with a visual cue about the type of data to be entered into the mask.

Placeholders represent data types assigned by the application.  The standard mask placeholders and the character entries they accept are as follows:

Character	Definition
#	numeric only
&	any character
?	alpha only
A	alpha-numeric
U	uppercase alpha
L	lowercase alpha
H	hexidecimal (0-9, A-F)
\	Denotes the next character in the input mask as a hard coded character, rather than a symbol defining a mask character.  This allows the mask characters to represent their regular keyboard character in the mask.
Note:  These mask characters are predefined.  User-defined mask characters are also available.  See the MaskChar property in Chapter 4 for details.

Literal Characters, or simply, literals, are characters placed in a specific position in the input mask to provide visual cues to the user about the type of data to be entered.

The parentheses and the dash in the following telephone number mask are literals; they represent a familiar telephone number format:

(# # #) # # # - # # # #

The # signs are placeholders.  These particular placeholders are numeric data placeholders, indicating that only numeric values may be entered into these character positions.

Editing in an fpMask Control

Mask controls are edited differently than other formatted edit controls.  The following guidelines apply:

1.    Once the input mask has been defined, the insertion point in the fpMask Control automatically skips over literals as the user types in data or moves the insertion point.

2.    Inserting or deleting a character causes all nonliteral characters to the right of the insertion point to shift, as necessary.  If shifting causes a validation error, the insertion or deletion is prevented, and an InvalidData event occurs.

3.    When text is selected in an fpMask control and copied, cut, or pasted, the entire selection, including the literals, is transferred onto the Clipboard by default.  In order to transfer only user-entered data onto the clipboard you must set the ClipMode property to True; this prevents literal characters from the input mask from being sent to the Clipboard.

fpMask Unique Properties

AllowOverflow

Allows/prevents character insertion into a full mask control.

BestFit

Allows/Prevents pasting data into the control which does not match the specific input mask of the control.

ClipMode

Sets or returns the place setting of the literal characters in the fpMask control.

DataFormat

Determines whether or not to save the data in an fpMask control to the database with literals.

Mask

Determines the input mask for the fpMask Control.

MaskChar

Allows the user to define the mask characters for the characters '0' through '9'.

PromptChar

Sets or returns the character used to prompt the user for input into an fpMask control.

PromptInclude

Allows/prevents the use of prompt characters in the input mask of a fpMask control.

RequireFill

Determines whether the input mask must be entirely filled when an fpMask control loses focus.

UnFmtText

Sets or retrieves the value of the text in the mask without the literals.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About	DragIcon	* OnFocusNoSelect
* Action	DragMode	* OnFocusPosition
* AlignTextH	* DropShadowColor	* OnFocusShadow
* AlignTextV	* DropShadowWidth	Parent
* AllowNull	Enabled	** PromptChar
** AllowOverflow	FontBold	** PromptInclude
* AutoAdvance	FontItalic	* Redraw
* AutoBeep	FontName	** RequireFill
* AutoCase	FontSize	* SelLength
BackColor	FontStrikeThru	* SelStart
** BestFit	FontUnderline	* SelText
* BorderColor	ForeColor	TabIndex
* BorderGrayAreaColor	Height	TabStop
* BorderStyle	* HelpContextID	Tag
* BorderWidth	* HideSelection	* Text
* ButtonDisable	* hWnd	* ThreeDFrameWidth
* ButtonHide	Index	* ThreeDInsideHighlightColor
* ButtonIncrement	* InvalidColor	* ThreeDInsideShadowColor
* ButtonIndex	* InvalidOption	* ThreeDInsideStyle
* ButtonMax	* IsNull	* ThreeDInsideWidth
* ButtonMin	* IsValid	* ThreeDOutsideHighlightColor
* ButtonStyle	Left	* ThreeDOutsideShadowColor
* ButtonWidth	* MarginBottom	* ThreeDOutsideStyle
* ButtonWrap	* MarginLeft	* ThreeDOutsideWidth
* CaretInsert	* MarginRight	* ThreeDText
* CaretOverWrite	* MarginTop	* ThreeDTextHighlightColor
* CharPositionLeft	** Mask	* ThreeDTextShadowColor
* CharPositionRight	** MaskChar	* ThreeDTextOffset
** ClipMode	MousePointer	Top
* ControlType	Name	** UnFmtText
* CurrentPosition	* NoSpecialKeys	* UserEntry
DataChanged	* NullColor	Visible
DataField	* OnFocusAlignH	Width
** DataFormat	* OnFocusAlignV
DataSource	* OnFocusInvert3D
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpMemo Control

Description

The fpMemo Control is a an enhanced version of the standard Text Box control, breaking the 64K data limit and offering other custom options.

Figure 3.16	A Typical fpMemo Control

File Name	AWAREMM.VBX

Discussion

The fpMemo control retrieves and sets text and scrolls through large amounts of data (exceeding 64K).  The TextMode property determines how data is retrieved or set using the Text property, and provides a variety of choices:  Data can be read into the fpMemo control in blocks of text or line by line (designated by the LineIndex property), data can be set to replace the current text, or data can be set to append to existing text.

You can retrieve the actual number of lines in any fpMemo control, or set the maximum number of lines allowed in the control using the LineCount and LineLimit properties, respectively.

Several common word processing features are also provided for customizing the fpMemo control.  You can set scroll bars as needed for browsing through text with the ScrollBars property, show an end of line character to indicate carriage returns with the ShowEOL property, customize the selection of highlighted text with the SelMode property, or allow text to word wrap (set WordWrap to True) upon reaching the designated PageWidth setting.

fpMemo Unique Properties

LineCount

Returns the actual number of lines of text in an fpMemo control.

LineIndex

Sets the index used to retrieve a line of text via the Text property when the TextMode property is set to 3 (Line).

LineLimit

Sets or returns the maximum number of lines of text allowed in an fpMemo control.

PageWidth

Sets or returns the maximum line width or boundary for word wrapping in an fpMemo control.

ScrollBars

Specifies whether an fpMemo control has horizontal or vertical scrollbars.

SelMode

Sets the mode for highlighting selected text.

ShowEOL

Determines whether to display a paragraph character to mark carriage returns.

TextMode

Sets the mode for retrieving and setting text with the Text property.

WordWrap

Determines whether to allow text wrap to the next line in an fpMemo control.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* About
* Action	FontBold	** PageWidth
* AlignTextH	FontItalic	* Redraw
* AlignTextV	FontName	** ScrollBars
* AllowNull	FontSize	* SelBkColor
* AutoAdvance	FontStrikeThru	* SelForeColor
* AutoBeep	FontUnderline	* SelLength
BackColor	ForeColor	** SelMode
* BorderColor	Height	* SelStart
* BorderGrayAreaColor	* HelpContextID	* SelText
* BorderStyle	* HideSelection	** ShowEOL
* BorderWidth	* hWnd	TabIndex
* ButtonDefaultAction	Index	TabStop
* ButtonDisable	* InvalidColor	Tag
* ButtonHide	* InvalidOption	* Text
* ButtonIncrement	* IsNull	** TextMode
* ButtonIndex	* IsValid	* ThreeDFrameWidth
* ButtonMax	Left	* ThreeDInsideHighlightColor
* ButtonMin	** LineCount	* ThreeDInsideShadowColor
* ButtonStyle	** LineIndex	* ThreeDInsideStyle
* ButtonWidth	** LineLimit	* ThreeDInsideWidth
* ButtonWrap	* MarginBottom	* ThreeDOutsideHighlightColor
* CaretInsert	* MarginLeft	* ThreeDOutsideShadowColor
* CaretOverWrite	* MarginRight	* ThreeDOutsideStyle
* CharPositionLeft	* MarginTop	* ThreeDOutsideWidth
* CharPositionRight	MousePointer	* ThreeDText
* ControlType	Name	* ThreeDTextHighlightColor
* CurrentPosition	* NoSpecialKeys	* ThreeDTextShadowColor
DataChanged	* NullColor	* ThreeDTextOffset
DataField	* OnFocusAlignH	Top
DataSource	* OnFocusAlignV	* UserEntry
DragIcon	* OnFocusInvert3D	Visible
DragMode	* OnFocusNoSelect	Width
* DropShadowColor	* OnFocusPosition	** WordWrap
* DropShadowWidth	* OnFocusShadow
Enabled	Parent
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


fpText Control

Description

The fpText Control is a formatted edit control which can display information entered at design time, entered by the user, or assigned to the control in code at run time.

Figure 3.17	An fpText Control with 3D-Text

File Name	AWARE.VBX

Discussion

The fpText control is an enhanced version of Visual Basics TextBox control, providing special features for formatting and display of text data.  Use it for modification and retrieval of data from a database, or for user entry of text data.  All data in an fpText control: numeric values, symbols, or letters, are considered string character input.

The fpText control is limited to 255 characters.  Use the fpMemo control for text entry greater than 255 characters.

Formatting and Validating Data

The fpText control offers several ways to format and validate data.  These features allow both the developer and the user to customize retrieval and entry of data, as well as to determine its validity.

Case Restriction

You can restrict the case of the data in an fpText control with the AutoCase property.  These case settings are available:

Setting	Description
0	No case:  No automatic case setting is applied.  Case changing must be done through the keyboard.
1	Sets the case to Upper case.
2	Sets the case to Lower case.
3	Sets the case to Proper case.
4	Sets the case to Proper case with allowance for uppercase characters within a string under 2 conditions:  1)   When an upper case character may be keyed in if it is in between two lower case characters within the string.   2)   When an upper case character may be keyed in when the entire string is in upper case.  If the <CapsLock> key is on, all caps are displayed in the control.
All data retrieved from a database must be modified through the keyboard before being sent back to the database in order for the AutoCase setting to apply to the data.

Limiting Character Entry

The fpText control provides methods for limiting data entered into the fpText control.  The MaxLength property sets the maximum number of allowed characters in the control (MaxLength must be no greater than 255), and the MultiLine property determines whether to allow text to be entered on more than one line.

Another way to limit data in an fpText control is with the CharValidationText and UserEntry properties.  By setting the CharValidationText property to ABC123, for example, you limit valid data entry to the letters A, B, and C, and the numbers 1, 2, and 3.  Each character is validated independently, regardless of its position in the control.  Set the UserEntry property to 0 (Formatted) to enforce character-by-character validation.

All of the following data entries are valid for this example:

Valid Data Entries when CharValidationText = ABC123

1111AAABCB32	CCC222
ABABAB	3
321321	A1B2C3
The table below lists invalid entries for the above example:

Invalid Data Entries when CharValidationText = ABC123

aAbBcC123	1234512345
aaaabbbbcccc	TATA
A=1
Note:  The CharValidationText property is case sensitive, so the lowercase entries a, b, and c in the second table cause the data to be invalid.

Invalid data entered in the control is allowed until the control loses focus.  Upon losing focus validation of the data occurs and if the data is invalid, an InvalidData event is fired and the control changes to InvalidData mode.

Limiting User Access

You can use the PasswordChar property to determine whether the characters typed by a user or placeholder characters are displayed in an fpText control.  This property allows you to create a password field in a dialog box.  Any string may be assigned to this property, but only the first character is significant; all others are ignored.

Display of Data in an fpText Control

Use the CharPositionLeft and CharPositionRight properties to determine the index of the leftmost and rightmost characters in the display window of an fpText control.  In Figure 3.16 below the text in both control is the same, however, the bottom control is not wide enough to display the entire sentence.

Figure 3.18	CharPosition Properties

The CharPositionLeft and CharPositionRight properties in Figure 3.18 retrieve the position of the first and last characters in the onfocus control and allow the user to determine what section of text is displayed.

Use the IncHoriz property to determine the increment used to shift text in a text control when the slide button is being used or when the caret is moved beyond the leftmost or rightmost character displayed.

fpText Unique Properties

AutoCase

Automatically formats the case of the text in a control.

CharPositionLeft, CharPositionRight

Returns the index of the leftmost and rightmost characters in the display window of an fpText control, respectively.

CharValidationText

Limits the string of characters which the user can enter in a control.

IncHoriz

Sets or returns the increment by which the caret in the control moves through the text characters when the slide button is clicked or when the caret is moved beyond the leftmost or rightmost character displayed.

MaxLength

Sets the maximum number of characters the user may enter in a control.

MultiLine

Determines whether to allow multiple lines in an fpText control.

PasswordChar

Determines whether the characters typed by a user or placeholder characters are displayed in an fpText control; determines the character used as a placeholder.

UserEntry

Determines how data will be accepted by an fpText control when the text string has been set with the CharValidationText property.

Note:  The properties, events, and methods for this control are listed below.  Common Aware/VBX properties and events are marked with a single asterisk (*).  Aware/VBX properties and events which are distinct for this control are marked with a double asterisk (**).  All marked properties are documented in this manual.  Refer to Visual Basics Language Reference for documentation on the remaining properties, events and methods.

Properties
* Action	* DropShadowColor	* OnFocusInvert3D
* AlignTextH	* DropShadowWidth	* OnFocusNoSelect
* AlignTextV	Enabled	* OnFocusPosition
* AllowNull	FontBold	* OnFocusShadow
* AutoAdvance	FontItalic	Parent
* AutoBeep	FontName	** PasswordChar
** AutoCase	FontSize	* Redraw
BackColor	FontStrikeThru	* SelLength
* BorderColor	FontUnderline	* SelStart
* BorderGrayAreaColor	ForeColor	* SelText
* BorderStyle	Height	TabIndex
* BorderWidth	* HelpContextID	TabStop
* ButtonDefaultAction	* HideSelection	Tag
* ButtonDisable	* hWnd	* Text
* ButtonHide	** IncHoriz	* ThreeDFrameWidth
* ButtonIncrement	Index	* ThreeDInsideHighlightColor
* ButtonIndex	* InvalidColor	* ThreeDInsideShadowColor
* ButtonMax	* InvalidOption	* ThreeDInsideStyle
* ButtonMin	* IsNull	* ThreeDInsideWidth
* ButtonStyle	* IsValid	* ThreeDOutsideHighlightColor
* ButtonWidth	Left	* ThreeDOutsideShadowColor
* ButtonWrap	* MarginBottom	* ThreeDOutsideStyle
* CaretInsert	* MarginLeft	* ThreeDOutsideWidth
* CaretOverWrite	* MarginRight	* ThreeDText
** CharPositionLeft	* MarginTop	* ThreeDTextHighlightColor
** CharPositionRight	** MaxLength	* ThreeDTextShadowColor
** CharValidationText	MousePointer	* ThreeDTextOffset
* CurrentPosition	** Multiline	Top
DataChanged	Name	* UserEntry
DataField	* NoSpecialKeys	Visible
DataSource	* NullColor	Width
DragIcon	* OnFocusAlignH
DragMode	* OnFocusAlignV
Events
* Advance	DragDrop	KeyUp
* ButtonHit	DragOver	LostFocus
* Change	GotFocus	MouseDown
* ChangeMode	* InvalidData	MouseMove
* Click	KeyDown	MouseUp
* DblClick	KeyPress	* UserError
Methods
Drag	Refresh	ZOrder
Move	SetFocus


Properties

A

About

Action

AlarmTime

AlignPictureH

AlignPictureV

AlignTextH

AlignTextV

AllowMoveHand

AllowNull

AllowOverflow

AnalogFace

AnalogHourFill

AnalogHourFillColor

AnalogHourHandAngle

AnalogHourHandColor

AnalogHourHandPts

AnalogHourHandRadius

AnalogMinFill

AnalogMinFillColor

AnalogMinHandAngle

AnalogMinHandColor

AnalogMinHandPts

AnalogMinHandRadius

AnalogSecFill

AnalogSecFillColor

AnalogSecHandAngle

AnalogSecHandColor

AnalogSecHandPts

AnalogSecHandRadius

AnalogTickFillColor

AnalogTicks

AnalogTickShadowColor

AutoAdvance

AutoBeep

AutoCase

AutoSet

AutoToggle

AutoUpdate

B

BackColor

BestFit

BinaryStyle

BooleanMode

BooleanPicture

BooleanStyle

BorderColor

BorderGrayAreaColor

BorderStyle

BorderWidth

ButtonDefaultAction

ButtonDisable

ButtonHide

ButtonIncrement

ButtonIndex

ButtonMax

ButtonMin

ButtonStyle

ButtonWidth

ButtonWrap

C

Caption

CaretInsert

CaretOverWrite

CharPositionLeft

CharPositionRight

CharValidationText

ClipMode

ClockMode

ClockStyle

Col

ColAlignH

ColDataField

ColFieldType

ColFormat

ColHeaderAlignH

ColHeaderText

ColHide

ColList

ColSorted

ColSortSequence

ColText

ColumnEdit

Columns

ColumnSeparatorChar

ColumnWidthScale

ColWidth

ComboListWidth

ControlType

CurrencyDecimalPlaces

CurrencyNegFormat

CurrencyPlacement

CurrencySymbol

CurrentDate

CurrentPosition

CurrentTime

D

DataChanged

DataField

DataFieldList

DataFormat

DataSource

DataSourceList

DateCalcMethod

DateDefault

DateMax

DateMin

DateTimeFormat

DateValue

Day

DecimalPlaces

DecimalPoint

DragIcon

DragMode

DropShadowColor

DropShadowWidth

E

ElapsedTime

Element

Element3DHighlightColor

Element3DShadowColor

Element3DShadowWidth

Element3DStyle

Element3DText

ElementBackColor

ElementForeColor

ElementIndex

Enabled

F

FieldType

FirstDayOfWeek

FixedPoint

FontBold

FontItalic

FontName

FontSize

FontStrikethru

FontUnderline

ForeColor

ForeColor

fpListBox)

G

GrayAreaBackColor

GrayAreaForeColor

GrayAreaStyle

GroupID

GroupSelect

GroupTag

GroupValue

H

Header3DHighlightColor

Header3DShadowColor

Header3DStyle

Header3DText

Header3DTextHighlightColor

Header3DTextOffset

Header3DTextShadowColor

Header3DWidth

HeaderBackColor

HeaderFontBold

HeaderFontItalic

HeaderFontName

HeaderFontSize

HeaderFontStrike

HeaderFontUnder

HeaderForeColor

HeaderHeight

HeaderShow

HeaderStyle

Height

HelpContextID

HideSelection

Hour

hWnd

I

IncDec

IncHoriz

IncInt

Index

Interval

InvalidColor

InvalidOption

IsNull

IsValid

J

K

L

LeadZero

Left

LineColor

LineCount

LineHighlightColor

LineIndex

LineLimit

LineShadowColor

LineStyleH

LineStyleV

LineWidth

List

List3DText

List3DTextHighlightColor

List3DTextOffset

List3DTextShadowColor

ListCount

ListIndex

M

MarginBottom

MarginLeft

MarginRight

MarginTop

Mask

MaskChar

MaxDrop

MaxLength

MaxValue

Min

MinValue

Month

MonthHeaderStyle

MousePointer

MultiLine

MultiSelect

N

Name

NegFormat

NegToggle

NoSpecialKeys

NullColor

O

OnFocusAlignH

OnFocusAlignV

OnFocusInvert3D

OnFocusNoSelect

OnFocusPosition

OnFocusShadow

P

PageWidth

Parent

PasswordChar

Picture

PictureFalse

PictureFalseDisabled

PictureFalseDown

PictureTrue

PictureTrueDisabled

PictureTrueDown

PromptChar

PromptInclude

Q

R

Redraw

RequireFill

Row

S

ScrollBars (fpBinary)

ScrollBars (fpComboBox

ScrollBars (fpMemo)

Sec

Seconds

Sel3DHighlightColor

Sel3DShadowColor

Sel3DStyle

Sel3DWidth

SelBackColor

SelCount

SelDrawFocusRect

Selected

SelForeColor

SelLength

SelMax

SelMode

SelStart

SelText

Separator

ShowEOL

Sorted

StartTime

Style

T

TabIndex

TabStop

Tag

Text(Formatted Edit, fpBoolean)

Text(fpComboBox)

TextDisabled

TextFalse

TextMode

TextTrue

ThreeDFrameWidth

ThreeDInsideHighlightColor

ThreeDInsideShadowColor

ThreeDInsideStyle

ThreeDInsideWidth

ThreeDOutsideHighlightColor

ThreeDOutsideShadowColor

ThreeDOutsideStyle

ThreeDOutsideWidth

ThreeDText

ThreeDTextHighlightColor

ThreeDTextOffset

ThreeDTextShadowColor

TimeDefault

TimeMax

TimeMin

TimeScale

TimeString1159

TimeString2359

TimeStyle

TimeValue

ToggleFalse

ToggleTrue

Top

TopIndex

U

UnFmtText

UserDefinedFormat

UserEntry

UseSeparator

V

Value (Formatted Edit)

Value (fpBoolean)

VirtualMode

VirtualScrollMax

Visible

W

WeekDayHdr

Width

WordWrap

WrapList

X

Y

Year

YearHeaderStyle

Z


About

Description  Displays a dialog box at design time or can be used to retrieve version information at run time.

Usage	[form.]control.About[ = text$]

Remarks	The version number is displayed on the first line of text in the About box.  At run time, you can retrieve the version as a string and can convert the string to a floating point number.  The format is M.NN, where M represents the major version number as a one digit number from 0-9, and NN represents the minor version number as a two digit value from 00-99.

Data Type	String

Applies To	All Aware/VBX Controls.

Example	This example checks the version information in an fpText control and exits the control if the version is less than 1.01.

Sub Form_Load()

if (fpText1.About < 1.01) then

exit

end if

End Sub


Action

Description  Executes an action based on the option assigned.

Usage 	[form.]control.Action[ = setting%]

Remarks	The Action property can be used to invoke standard editing functions and to customize the keyboard interface of an application.  Set the NoSpecialKeys property to 2 or 3 to prevent standard editing shortcuts assigned to certain keys or combinations of keys.  The corresponding action is executed on the selected text when a value is assigned to the property.  The Action property is not available at design time.

The following settings are available:

Option Setting	Corresponding Action
0	Copy:  Copies text to the clipboard.
1	Cut:  Cuts text to the clipboard.
2	Paste:  Pastes text from the clipboard.
3	Clear:  Clears the contents of the control.
4	Undo:  Removes the last edit.
5	SetNull:  Sets the contents of the control to Null.  Usually used with the fpText control to distinguish a null value from an empty string in the control.
6	SetDate:  Sets the contents of the fpDateTime control to the current date and time.
7	PopUp:  Fires the PopUp event (applies to the fpDateTime control only).
Data Type 	Integer (Enumerated)

Applies To 	Formatted Edit Controls.

See Also	NoSpecialKeys Property.

Example	This example shows how to use the Action property to implement the special keys <Ctrl+C>,<Ctrl+Z>, <Ctrl+V>, <Ctrl+X>, <F2>,< F3>, <F4>.  The NoSpecialKeys property is set to 3 in the form load to disable standard key actions.

Sub Form_Load ()

fpDateTime1.NoSpecialKeys = 3

End Sub

Sub fpDateTime1_KeyDown (keycode As Integer, shift As Integer)

'Ctrl pressed

If (shift = 2) Then

Select Case (keycode)

Case 67:	'Ctrl-C copy

fpDateTime1.Action = 0

Case 86:	'Ctrl-V paste

fpDateTime1.Action = 2

Case 88:	'Ctrl-X cut

fpDateTime1.Action = 1

Case 90:	'Ctrl-Z undo

fpDateTime1.Action = 4

Case 68:	'Ctrl-D clear selection

fpDateTime1.Action = 3

Case 78:	'Ctrl-N null

fpDateTime1.Action = 5

End Select

Else

Select Case (keycode)

Case 113:	'F2 clear contents (set to null)

fpDateTime1.Action = 5

Case 114:	'F3 default

fpDateTime1.Action = 6

Case 115:	'F4 popup

fpDateTime1.Action = 7

End Select

End If

End Sub


AlarmTime

Description  Sets or retrieves the alarm time in the fpClock control.

Usage	[form.]control.AlarmTime[ = text$]

Remarks  	When the CurrentTime and AlarmTime properties are equal the Alarm event is fired.  Set the display format for the time with the TimeScale property.

Note:  In order to make an alarm sound upon reaching the alarm time, you can either make an API call to the Windows sound function (Refer to the Alarm event example in Chapter 5) or call the Visual Basic Beep function (Refer to the Visual Basic Progammers Guide for details).

Default 	Empty string

Data Type 	String (Format specified by the TimeScale property)

Applies To 	fpClock Control.

See Also 	CurrentTime, ElapsedTime, StartTime, TimeScale Properties.

Example	This example sets an analog clock alarm to beep every 5 seconds, beginning 5 seconds after the application has begun.

Sub Form_Load ()

'Initialize clock

fpClock1.AllowMoveHand = True

fpClock1.ClockStyle = 2	'Analog

fpClock1.ClockMode = 1	'12 hour

fpClock1.TimeScale = 3	'Seconds

fpClock1.AlarmTime =fpClock1.CurrentTime + 5

fpClock1.TimeScale = 0	'Default

End Sub

SubfpClock1_Alarm ()

'Beep when alarm goes off.

'Reset next alarm time for 5 seconds later

Beep

fpClock1.TimeScale = 3	'Seconds

fpClock1.AlarmTime =fpClock1.AlarmTime + 5

fpClock1.TimeScale = 0	'Default

End Sub


AlignPictureH
AlignPictureH, AlignPictureV

Description  Sets the placement of a bitmap within the control.

Usage	[form.]control.AlignPictureH[ = setting%]

[form.]control.AlignPictureV[ = setting%]

Remarks 	The AlignPictureH and AlignPictureV properties allow the user to customize the placement of a bitmap within an fpBoolean control.  The alignment is always set with reference to the margins specified for the control.  These margins must be specified with the margin properties before aligning the bitmap.  AlignPictureH sets the horizontal location of the bitmap.  AlignPictureV sets the vertical alignment of the bitmap.

When the left and right margins or the top and bottom margins of the control are unequal, the center alignment setting of the AlignPictureH and AlignPictureV properties are centered with respect to the margins, but uncentered with respect to the border of the control.  For example, if the right margin is set to 5 pixels and the left margin is set to 10 pixels, setting the AlignPictureH property to 1 (center), centers the text between the margins, but the text will not be centered with respect to the border of the control.

Note:  Alignment of a bitmap in the fpBoolean control is independent of alignment of the text in the same control; therefore, the user may align text to overlap the bitmap in the control if desired.

The following settings are available:

Setting	Description
AlignPictureH
0	Left:  Aligns picture against the left margin of the control.
1	Center:  Centers picture between the right and left margins of the control.
2	Right:  Aligns picture against the right margin of the control.
3	Left of Text:  Aligns picture to the left of the text in the control.  Text is aligned between the right of the bitmap and the right margin of the control.
4	Right of Text:  Aligns picture to the right of the text in the control.  Text is aligned between the left of the bitmap and the left margin of the control.
AlignPictureV
0	Top:  Aligns picture against the top margin of the control.
1	Center:  Centers picture between the top and bottom margins of the control.
2	Bottom:  Aligns picture against the bottom margin of the control.
Default	3 (Left of Text) for AlignPictureH, 1 (Center) for AlignPictureV

Data Type 	Integer (Enumerated)

Applies To	fpBoolean Control.

See Also	AlignTextH, AlignTextV, MarginBottom, MarginLeft, MarginRight, MarginTop Properties.

Example	This example sets an fpBoolean control to display pictures representing the different states of the control.

Sub Form_Load ( )

'Create a button that contains graphics(right of text) and text

fpBoolean1.BooleanMode = 1	'Set three state control

fpBoolean1.BooleanStyle = 2	'Bitmap only in control

fpBoolean1.BooleanPicture = 4	'User defined picture

fpBoolean1.PictureTrueDown = LoadPicture("c:\vb\icons\office\clip01.ico")

fpBoolean1.PictureTrue = LoadPicture("c:\vb\icons\office\clip02.ico")

fpBoolean1.PictureTrueDisabled = LoadPicture("c:\vb\icons\office\clip03.ico")

fpBoolean1.PictureFalseDown = LoadPicture("c:\vb\icons\office\clip04.ico")

fpBoolean1.PictureFalse = LoadPicture("c:\vb\icons\office\clip05.ico")

fpBoolean1.PictureFalseDisabled = LoadPicture("c:\vb\icons\office\clip06.ico")

fpBoolean1.AlignPictureH = 4	'Right align picture

fpBoolean1.AlignPictureV = 1	'Center picture vertically

End Sub


AlignTextH
AlignTextH, AlignTextV

Description  Sets or retrieves the alignment of the text in a control.

Usage	[form.]control.AlignTextH[ = setting%]

[form.]control.AlignTextV[ = setting%]

Remarks	The AlignTextH and AlignTextV properties allow the user to customize the placement of text within a formatted edit control.  The alignment is always set with reference to the margins specified for the control.  These margins must be specified with the margin properties before aligning the text.  AlignTextH sets the horizontal location of the text to left, center, or right.  AlignTextV sets the vertical alignment of the text to top, center, or bottom.

When the left and right margins or the top and bottom margins of the control are unequal, the center alignment setting of the AlignTextH and AlignTextV properties are centered with respect to the margins, but uncentered with respect to the border of the control.  For example, if the right margin is set to 5 pixels and the left margin is set to 10 pixels, setting the AlignTextH property to 1, or center, centers the text between the margins, but the text will not be centered with respect to the border of the control.

Note:  Alignment of text in the fpBoolean control is independent of alignment of a bitmap in the same control; therefore, the user may align text to overlap a bitmap in the control if desired.

The following settings are available:

Setting	Description
AlignTextH
0	Left:  Aligns text against the left margin of the control.
1	Center:  Centers text between the left and right margins of the control.
2	Right:  Aligns text against the right margin of the control.
AlignTextV
0	Top:  Aligns text against the top margin of the control.
1	Center:  Centers text between the top and bottom margins of the control.
2	Bottom:  Aligns text against the bottom margin of the control.
Default	0 (Left) for AlignTextH, 0 (Top) for AlignTextV, except for fpBoolean, which uses 1 (Center) for AlignTextV

Data Type	Integer (Enumerated)

Applies To	Formatted Edit Controls and fpBoolean.

See Also	AlignPictureH, AlignPictureV, MarginBottom, MarginLeft, MarginRight, MarginTop, OnFocusAlignH, OnFocusAlignV Properties.

Example	This example allows an end user to click a button to re-align text in the specified text controls with the AlignText and margin properties.  The Redraw property is used to prevent flickering from control changes.

Sub Form_Load

'Assign text to controls

fpText1.Text = "Click'Change' to re-align the text"

fpText2.Text = "in the controls"

End Sub

Sub Reposition_Click ()

'Turn redraw off to prevent flickering

fpText1.Redraw = False

fpText2.Redraw = False

'Add text to the control

fpText1.Text = "This text is"

fpText2.Text = "Re-Aligned"

'Center text

fpText1.AlignTextH = 1 	'Center

fpText1.AlignTextV = 1 	'Center

'Turn redraw on

fpText1.Redraw = True

fpText2.Redraw = True

End Sub


AllowMoveHand

Description  Allows change of time by clicking on a mouse button and dragging and dropping the hands on an analog clock in an fpClock control.

Usage 	[form] control.AllowMoveHand[ = setting%]

Remarks 	When the AllowMoveHand property is set to 1 (Left Button) or 2 (Right Button), the user may click and hold down the appropriate mouse button over any hand on an analog clock and drag the hand to a different position on the clock face.  The MoveHand event fires when the mouse is clicked.  Upon release of the left mouse button, the hand drops to the new position on the clock face, the CurrentTime property is updated and the Change event is fired.  The following settings are available:

Setting	Description
0	None:  Mouse click does not change time.
1	Left Button:  Allows dragging and dropping of hands with the left mouse button.
2	Right Button:  Allows dragging and dropping of hands with the right mouse button.
Note:  The CurrentTime property changes as the mouse button is released.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpClock Control.

See Also 	MoveHand Event.

Example	This example allows the user to drag and drop the clock hands in an analog clock.  When the hand is moved, the time will be displayed in a clock using the 24 hour clock format.

Sub Form_Load ()

fpClock1.AutoSet = False

fpClock1.AutoUpdate = False

fpClock1.ClockMode = 2	'24 Hour Format

fpClock2.ClockStyle = 2	'Analog

fpClock2.AllowMoveHand = True

End Sub

SubfpClock2_MoveHand (OldHour As Integer, OldMin As Integer, OldSec As Integer, NewHour As Integer, NewMin As Integer, NewSec As Integer)

fpClock1.CurrentTime = Format(NewHour, "00") + ":" + Format(NewMin,

"00") + ":" + Format(NewSec, "00")

End Sub


AllowNull

Description  Determines whether or not the Null value is a recognized value in a formatted edit control.

Usage 	[form.]control.AllowNull[ = boolean%]

Remarks 	The AllowNull property must be set to True in order for the other null properties to function.  When the AllowNull property is set to True, Null becomes a distinct, recognized value for the control.

For all of the controls except the fpText control, the field value is recognized as Null when the user selects the entire content of the field and deletes it.  The Null value can also be entered in a control by pressing the <F2> (Clear) key or the <Ctrl+N> (SetNull) key, or programmatically by setting the content to the empty string or setting the Action property to 3 (Clear).  The <F2> keypress is the same as setting the Action  property to 3 (Clear).  The <Ctrl+N> (SetNull) key is the same as setting the Action property to 5 (Set Null).

Note:  The Null value and the empty string in the fpText control do not represent the same value.  To set a text string in an fpText control to Null you must use the keyboard shortcut <Ctrl+N> or set the Action property to 5 (Set Null).

When the AllowNull property is False (the default value), Null values are not accepted in a control.  Deleting the contents of the control or entering the empty string into the control have the same effect as setting the default value when the control loses focus.

The default value for each formatted edit control is as follows:

Control	Default Value (Used when AllowNull is False)
fpDateTime	When the DateCalcMethod property is set to 0, the current date and/or time is the default value.  For other settings of the DateCalcMethod property, the default date and/or time is used.
Numeric Controls:  fpCurrency, fpDoubleSingle, fpLongInteger	Whichever is greater:  Zero or the value set by the MinValue or MaxValue property that is closest to zero.
fpMask	The empty mask.
fpText, fpMemo	The empty string.
Default	False

Data Type	Integer (Boolean)

Applies To	Formatted Edit Controls.

See Also	IsNull, NullColor Properties.

Example	This example allows the end user to input null values into a fpText control.  When a null value has been entered, the content of the control is initialized to null and the color of the control changes to the NullColor.

Sub Form_Load ()

'Assign Null properties and color to the text control

fpText1.AllowNull = True

fpText1.NullColor = RGB(128, 0, 0)

fpText1.Action = 5	'Null

End Sub


AllowOverflow

Description  Allows/Prevents insertion of extra characters into a full mask control.

Usage 	[form] control.AllowOverflow [ = boolean%]

Remarks 	When the AllowOverflow property is True, the user may enter a character into a full mask control in insert mode without deleting or overwriting any characters.  A new character entry shifts the next characters one place to the right, provided the mask remains valid with the character shift.  The farthest right character in the mask is truncated upon shifting.

When the AllowOverflow property is set to False (the default value), the user cannot type characters into a full mask while in insert mode.  To change characters, the user must enter overwrite mode or delete characters to create room in the mask for new characters.

Note:  You can switch from insert mode to overwrite mode by pressing the <Insert> key.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpMask Control.

See Also 	Mask, MaskChar, RequireFill Properties.

Example	This example initializes a mask to accept a phone number.  By setting AllowOverflow to True, the user can insert a new character anywhere in the mask.  This will shift all characters to right.

Sub Form_Load ()

fpMask1.Mask = "(###) ###-####"

fpMask1.AllowOverflow = True

fpMask1.Text = ""

End Sub


AnalogFace

Description  Sets the appearance of the analog clock face in an fpClock control to display Roman numerals, Arabic numbers or no numbers.

Usage	[form.]control.AnalogFace[ = setting%]

Remarks  	The AnalogFace property is used when the ClockStyle property is set to 2 (Analog).  The following clock faces are available:

Setting	Description
0	No Text: Clock face is similar to Windows system clock.
1	4 Roman Numerals: (III, VI, IX, XII).
2	12 Roman Numerals:  (I, II, III, ..XII).
3	4 Arabic Numbers:  (3, 6, 9, 12).
4	12 Arabic Numbers:  (1, 2, 3, ..12).
Note:  The FontSize property setting for fpClock controls is calculated based on the size of the control when the clock is created.  You can set the FontSize at design time or programmatically to change it.

Default 	0 (No Text)

Data Type 	Integer (Enumerated)

Applies To 	fpClock

See Also 	ClockStyle Property.


AnalogHourFill
AnalogHourFill, AnalogMinFill, AnalogSecFill

Description  Determines whether to use the fill color to fill in the minute, hour, and second hands or the ticks on an Analog clock face in an fpClock control, respectively.

Usage	[form.]control.AnalogHourFill[ = boolean%]

[form.]control.AnalogMinFill[ = boolean%]

[form.]control.AnalogSecFill[ = boolean%]

Remarks  	Set the appropriate fill property to True to use the AnalogFillColor designated for that hand.

Default 	False

Data Type 	Integer (Boolean)

Apply To 	fpClock

See Also 	AnalogHourHandColor, AnalogMinHandColor, AnalogSecHandColor, ClockStyle Properties.


AnalogHourFillColor
AnalogHourFillColor, AnalogMinFillColor, AnalogSecFillColor

Description  Set the color used to fill in the minute, hour, and second hands on an Analog clock face in an fpClock control, respectively.

Usage	[form.]control.AnalogHourFillColor[ = color]

[form.]control.AnalogMinFillColor[ = color]

[form.]control.AnalogSecFillColor[ = color]

Remarks  	Set the ClockStyle property to 2 (Analog) to display an analog clock face.

Note: Use the AnalogHandColor properties to set the outline color of each clock hand.

Default 	&H80000005& (Windows System Window Color)

Data Type 	Color

Apply To 	fpClock

See Also 	AnalogHourHandColor, AnalogMinHandColor, AnalogSecHandColor, ClockStyle Properties.


AnalogHourHandAngle
AnalogHourHandAngle, AnalogMinHandAngle, AnalogSecHandAngle

Description  Set the vector angle of the hour, minute, and second hands on an analog clock face in an fpClock control.

Usage	[form.]control.AnalogHourHandAngle(Index%)[ = value!]

[form.]control.AnalogMinHandAngle(Index%)[ = value!]

[form.]control.AnalogSecHandAngle(Index%)[ = value!]

Remarks	You can customize the shape of the hour, minute, and second hands on an analog clock (ClockStyle = 2) by setting values for the length and angle of each point of the hands.  The points are defined in polar coordinates.  The AnalogHandAngle properties set the angle value of the coordinate, i. e., the angle each point in the array is drawn from the 12 oclock position on the clock.  Set the radius value of the array with the AnalogHandRadius properties.  Set the number of points with the AnalogHandPts properties.

These properties are available at run time only.  Refer to the fpClock control section in Chapter 3, Custom Controls, for a detailed description on defining clock hands.

Data Type 	Short Array

Applies To 	fpClock

See Also 	AnalogHourHandRadius, AnalogMinHandRadius, AnalogSecHandRadius, ClockStyle Properties.


AnalogHourHandColor
AnalogHourHandColor, AnalogMinHandColor, AnalogSecHandColor

Description  Set the outline color of the minute, hour, and second hands on an analog clock face in an fpClock control, respectively.

Usage	[form.]control.AnalogHourHandColor[ = color]

[form.]control.AnalogMinHandColor[ = color]

[form.]control.AnalogSecHandColor[ = color]

Remarks  	Set the ClockStyle property to 2 (Analog) to display an analog clock face.

Note:  Use the AnalogFillColor properties to set the fill color of each clock hand.

Default 	&H80000008& (Windows System Text Color)

Data Type 	Color

Apply To 	fpClock

See Also 	AnalogHourFillColor, AnalogMinFillColor, AnalogSecFillColor, ClockStyle Properties.


AnalogHourHandPts
AnalogHourHandPts, AnalogMinHandPts, AnalogSecHandPts

Description  Set the number of points used for the vector array for the hour, minute, and second hands on an Analog clock face in an fpClock control.

Usage	[form.]control.AnalogHourHandPts[ = value%]

[form.]control.AnalogMinHandPts[ = value%]

[form.]control.AnalogSecHandPts[ = value%]

Remarks	Use the AnalogHandPts properties to set how many points to use to draw a hand on an Analog clock (ClockStyle = 2).  The maximum number of points you can set for any clock hand is 20.  Points are defined in polar coordinates.  Set the angle value of each point with the AnalogHandAngle properties.  Set the radius value of each point with the AnalogHandRadius properties.

These properties are available at run time only.  Refer to the fpClock control section in Chapter 3, Custom Controls, for a detailed description on defining clock hands.

Data Type 	Short

Applies To 	fpClock Control.

See Also	AnalogHourHandAngle, AnalogMinHandAngle, AnalogSecHandAngle, AnalogHourHandRadius, AnalogMinHandRadius, AnalogSecHandRadius, ClockStyle Properties.


AnalogHourHandRadius
AnalogHourHandRadius, AnalogMinHandRadius, AnalogSecHandRadius

Description  Set the vector length of the hour, minute, and second hands on an analog clock face in an fpClock control, respectively.

Usage	[form.]control.AnalogHourHandRadius(Index%)[ = value%]

[form.]control.AnalogMinHandRadius(Index%)[ = value%]

[form.]control.AnalogSecHandRadius(Index%)[ = value%]

Remarks	You can customize the shape of the hour, minute, and second hands on an analog clock (ClockStyle = 2) by setting array values for the length and angle of each point of the hands.  The points are defined in polar coordinates.  The AnalogHandRadius properties set the radius value of the coordinate, i. e., the length each point in the array is drawn from the center of the clock.  The maximum value for the radius of each hand is 100.  Set the angles with the AnalogHandAngle properties.  Set the number of points with the AnalogHandPts properties.

These properties are available at run time only.  Refer to the fpClock control section in Chapter 3, Custom Controls, for a detailed description on defining clock hands.

Data Type 	Short Array

Applies To 	fpClock Control.

See Also 	AnalogHourHandAngle, AnalogMinHandAngle, AnalogSecHandAngle, AnalogHourHandPts, AnalogMinHandPts, AnalogSecHandPts, ClockStyle Property.


AnalogTickFillColor
AnalogTickFillColor, AnalogTickShadowColor

Description  Set the color used to fill in and shadow the ticks on an analog clock face in an fpClock control, respectively.

Usage	[form.]control.AnalogTickFillColor[ = color]

[form.]control.AnalogTickShadowColor[ = color]

Remarks  	Set the ClockStyle property to 2 (Analog) to display an Analog clock face.

Default 	&H8000000F& (Windows System Button Face Color) for AnalogTickFillColor, &H80000006& (Windows System Window Frame Color) for AnalogTickShadowColor

Data Type 	Color

Apply To 	fpClock

See Also 	ClockStyle Property.


AnalogTicks

Description  Sets the number of ticks displayed on the analog clock face in an fpClock control.

Usage	[form.]control.AnalogTicks[ = setting%]

Remarks  	You can customize an analog clock with ticks which represent the hours or seconds on the clock face.  The ticks make the clock easier to read and set.  The following settings are available:

Setting	Description
0	None:  No ticks displayed.
1	Hour:  12 ticks displayed per rotation, one for each hour.
2	Minute:  60 ticks displayed per rotation, one for each second.
3	Both:  Hour ticks and second ticks displayed.
Note: When the AnalogFace property is set to 1 (Roman Numerals) or 2 (Arabic Numbers), the 12 hour ticks are replaced by numbers for the AnalogTick settings of 1 (Hour) and 3 (Both).

Default 	0 (No Ticks)

Data Type 	Integer (Enumerated)

Applies To 	fpClock

See Also 	AllowMoveHand, ClockStyle Properties.


AutoAdvance

Description  Allows/Prevents automatic advancement to the next control when the user tries to move the caret to the right of the last character.  Allows/Prevents automatic return to the previous control when the user tries to move the caret to the left of the first character.

Usage 	[form.]control.AutoAdvance[ = boolean%]

Remarks 	When the AutoAdvance property is set to True, the following behavior applies:

Pressing the <Tab> key advances focus to the next control.

Pressing the <Shift+Tab> key returns focus to the previous control.

Pressing the <UpArrow> key or the <LeftArrow> key when the caret is on the first character in a single line edit control returns focus to the previous control.

Pressing the <DownArrow> key or the<RightArrow> key when the caret is on the last character in a single line edit control advances focus to the next control.

Pressing the <UpArrow> key when the caret on the first line in a single line edit control returns focus to the previous control.

Pressing the <DownArrow> key when the caret on the first line in a single line edit control advances focus to the next control.

When a tab order has been defined for the sequential execution of the controls on the screen, the above keys send the focus to the previous or next control in the tab order, as appropriate.

When the AutoAdvance property is set to False (the default value), the above keys function as standard keys on the keyboard, and the UserError event is fired when an error is made.

Note:  The AutoAdvance property is not available for C++ implementation.

Default	False

Data Type	Integer (Boolean)

Applies To	Formatted Edit Controls.

See Also	TabIndex, TabStop Properties., UserError Event.

Example	This example initializes an array of 10 identical text boxes.  AutoAdvance is set to True so the user can navigate among the controls using either <Tab> and <Shift+Tab> or the arrow keys.

Sub Form_Load ()

Dim i As Integer

For i = 0 To 9

fpText1(i).AutoAdvance = True	'Set keys to auto advance

fpText1(i).BorderStyle = 1	'Single line border

fpText1(i).OnFocusInvert3D = True	'Invert 3D when in focus

fpText1(i).ThreeDOutsideStyle = 1	'Etched 3D style

fpText1(i).ThreeDOutsideWidth = 2	'Outside border 3D width

fpText1(i).Text = ""	'Set to empty string

Next i

End Sub


AutoBeep

Description  Enables/Disables beeping when a UserError event is fired.

Usage	[form.]control.AutoBeep[ = boolean%]

Remarks 	If the AutoBeep property is set to True, a beep sounds when a UserError occurs.  Refer to the UserError event for a list of UserErrors.  The AutoBeep property tells the UserError event the beep parameter default value.  This default value can be overwritten programmatically for special cases in the control.

Default	False

Data Type	Integer (Boolean)

Applies To	All Aware/VBX Controls except fpBoolean.

See Also	UserError Event.

Example	This example sets numeric and user defined masks for an fpMask control, and sets a beep to occur when an invalid character is entered.

Sub Form_Load ()

fpMaskBasic1.Mask = "#####-#####"	'Specify mask as

'numbers only

fpMaskBasic1.Text = "12345-67890"

fpMaskUserDefined.MaskChar(0) = "AEIOUaeiou"	'Specify user defined

'mask as upper and

'lowercase vowels

fpMaskUserDefined.Mask = "00000-00000"

fpMaskUserDefined.Text = "aeiou-AEIOU"

fpMaskUserDefined.AutoBeep = True

End Sub


AutoCase

Description  Automatically forces the case of the text in an fpText control.

Usage 	[form.]control.AutoCase[ = setting%]

Remarks  	The AutoCase property forces the case format of text entered into a control.  When the AutoCase property is set to 1, 2, or 3, typed text defaults to the chosen case setting, and does not respond to the <Shift> or <CapsLock> keys.  When the AutoCase property is set to 0, normal keyboard typing procedures occur.

Note:  Text entered in the control (programmatically or through a database) is formatted according to the setting of the AutoCase property, but the database field reflects this formatting only when the content of the data field is changed, causing the formatted data to be written back to the database.

Setting	Description
0	None:  No automatic case setting applies.  Case changing must be done through the keyboard.
1	Upper:  Sets the case to upper case.
2	Lower:  Sets the case to lowercase.
3	Proper:  Sets the case to proper case, whereby uppercase characters may be keyed in at the beginning of a string only.
4	Proper w/Upper:  Sets the case to proper case with allowance for uppercase characters within a string under 2 conditions:  1. An uppercase character may be keyed in between two lowercase characters within the string.  For example, the uppercase B in the string MacBeth may be keyed in. 2. An uppercase character may be keyed in when the entire string is in uppercase.  For example, the string III in the name William MacBeth III may be keyed in.  If the <CapsLock> key is on, all caps are displayed in the control.
Default	0 (No Case)

Data Type	Integer (Enumerated)

Applies To 	fpText Control.

See Also	Text Property.

Example	This example creates a password box, defining the length of a password and assiging a character to display when the proper password character is entered.  Input is forced to lowercase to ensure consistency.

Sub Form_Load ()

fpText1.Text = ""	'Text is empty string

fpText1.MaxLength = 8	'Maximum length of Password field

fpText1.AutoCase = 2 	'Force lowercase character input

fpText1.PasswordChar = "*"	'Set password character to '*'

End Sub


AutoSet

Description  Determines whether the clock in an fpClock control automatically sets and displays the current system time.

Usage	[form.]control.AutoSet[ = boolean%]

Remarks 	When the AutoSet property is set to True (the default value), the current system time is automatically set when the control is loaded.  When the AutoSet property is set to False, the time displayed in an fpClock control is user defined.  The clock will be set to the current system time at design time when the AutoSet property is True and properties such as the AutoUpdate property are changed.

Default 	True

Data Type	Integer (Boolean)

Applies To	fpClock control.

See Also	AutoUpdate Property, UserError Event.

Example	Refer to AllowMoveHand property example.


AutoToggle

Description  Allows or prevents a mouse click or <Spacebar> keypress to toggle the state of an fpBoolean control.

Usage	[form.]control.AutoToggle[ = boolean%]

Remarks	When the AutoToggle property is set to True, clicking the mouse on the control when the control is out of focus returns focus to the control and toggles the state of the control.  The <spacebar> key toggles the state of the control when the control already has focus.

Default	False

Data Type	Integer (Boolean)

Applies To	fpBoolean Control.

See Also	NegToggle, ToggleFalse, ToggleTrue Properties.

Example	This example sets a two-state fpBoolean control to display different text for true and false states.  The user can toggle between the states with the <Y> or <N> keys on the keyboard, but button and space bar toggling are disabled.

Sub Form_Load ()

fpBoolean1.AutoToggle = False	'Disable autotoggle

fpBoolean1.BooleanMode = 1	'Set 2 state control

fpBoolean1.BooleanStyle = 1	'Text only control

fpBoolean1.ToggleTrue = "yY"	'True state toggle characters

fpBoolean1.ToggleFalse = "nN"	'False state toggle characters

fpBoolean1.TextTrue = "True Text"	'Text for True state

fpBoolean1.TextFalse = "False Text"	'Text for False state

End Sub


AutoUpdate

Description  Determines whether to automatically update the time on the clock when a new time interval is reached.

Usage	[form.]control.AutoUpdate[ = boolean%]

Remarks	When the AutoUpdate property is set to True (the default value), the clock is updated when an Interval is reached and the Timer event is fired.  When the AutoUpdate property is set to False, the clock must be updated programmatically as desired.

Default 	True

Data Type	Integer (Boolean)

Applies To	fpClock Control.

See Also	Timer Event.

Example	This example initializes three clocks:  Clock 1 displays the current time, clock 2 displays the time when the application began, and clock 3 displays the amount of time that has elapsed since the application began.  AutoUpdate is disabled so only one clock requires a timer.

Sub Form_Load ()

fpClock2.AutoUpdate = False

fpClock3.ClockMode = 3	'StopWatch

fpClock3.AutoUpdate = False

fpClock1.StartTime =fpClock1.CurrentTime

fpClock2.CurrentTime =fpClock1.StartTime

End Sub

SubfpClock1_Change ()

fpClock3.CurrentTime =fpClock1.ElapsedTime

End Sub


BackColor
BackColor, ForeColor

Description  Refer to Visual Basic's Language Reference.

Usage	[form]control.BackColor[ = color]

[form]control.ForeColor[ = color]

Remarks 	The BackColor and ForeColor Properties. are used together and in conjunction with the 3-D Properties.  The color selected for the ForeColor should contrast with the color selected for the BackColor, and this BackColor should contrast with the ThreeDShadowColor and the ThreeDInsideHighlightColor in order to create the 3-D effect.  The 3-D effect is more dramatic if the BackColor selected for the control matches the back color of the Form.  You can experiment with different colors and shades to achieve the desired effect.

Default	&H80000006& (Windows System Window Color) for BackColor, &H80000008& (Windows System Window Text Color) for ForeColor

Data Type	Color

Apply To 	All Aware/VBX Controls except fpCalendar (see ElementBackColor as needed), however, the ForeColor property also does not apply to the fpBinary control.

See Also	ThreeDInsideHighlightColor, ThreeDInsideShadowColor, ThreeDOutsideHighlightColor, ThreeDOutsideShadowColor Properties.


BestFit

Description  Allows/Prevents data entry which does not match the specific input mask of an fpMask control.

Usage	[form.]control.BestFit[ = boolean%]

Remarks 	When the BestFit property is set to False (the default value), text must match the input mask exactly for data to be considered valid.  Any character not matching the mask is immediately rejected and a UserError event is fired.  Refer to the UserError event in Chapter 4 of this manual for a list of UserErrors.

When the BestFit property is set to True, the control reads each character entered and tries to place the data into the mask even if the data does not exactly match the input mask.  Mask literal characters are ignored.

For example, an input mask could be defined for telephone numbers which accepted the format ###-###-####, where the dashes represent literal characters and the number signs represent numeric values.  Setting the BestFit property to True in this case allows the user to enter telephone numbers from a database which were formatted as (###)###-####.  The control reads the first character and tries to find a place in the input mask where that character matches.  Upon finding a match, the control reads the next character and looks for a place in the mask after the first character which accepts the data.  In this way, although the literal characters are in different places when coming from the database, the input mask is able to read the field of ten numeric characters and place them in the mask appropriately.

The BestFit property has no effect on character by character validation.  The BestFit property only affects validation when pasting data via the clipboard, loading data from a database, or setting data programmatically.

Default	False

Data Type	Integer (Boolean)

Applies To	fpMask Control.

See Also 	Mask, MaskChar Properties., UserError Event.


BinaryStyle

Description  Sets the style for displaying a bitmap in the control.

Usage	[form.]control.BinaryStyle[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	Align left:  Places the bitmap in the top left corner of the control.
1	Align left w/scroll:  Places the bitmap in top left corner of the control.  Vertical and horizontal scrolling are available for viewing a bitmap which is larger than the control.
2	Center:  Places the center of the bitmap in center of the control.
3	Scale to fit:  Scales the bitmap to fit in the control.  Maintains the proportions of the bitmap.
4	Stretch to fit:  Stretches bitmap to fit in control.  Does not maintain proportions of bitmap.
Default	0 (Left, Top)

Data Type	Integer (Enumerated)

Applies To	fpBinary Control.

See Also	Picture Property.

Example	This example loads a picture into the binary control that can be scrolled through.

Sub Form_Load ()

fpBinary1.Picture = LoadPicture("c:\vb\icons\office\clip02.ico")

fpBinary1.BinaryStyle = 1 'Left

fpBinary1.ScrollBars = True

End Sub


BooleanMode

Description  Determines the number of available states represented by the fpBoolean control.

Usage	[form.]control.BooleanMode[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	2 State:  Possible values in the control are 0 (False) or 1 (True).  Disabled state is not available.
1	3 State:  Possible values in the control are 0 (False), 1 (True), or 2 (Disabled).
2	Button-Like: Emulates a button by increasing the border width of the control by one pixel when it is in focus and using inverted 3-D effects when the button is down.  This setting requires that the margin and BorderWidth properties be greater than or equal to 1.
Default	0 (Two State)

Data Type	Integer (Enumerated)

Applies To	fpBoolean Control.

See Also	Text, Value (fpBoolean)Properties.

Example	Refer to AutoToggle property example.


BooleanPicture

Description  Sets the type of bitmap to be used in the fpBoolean control.

Usage	[form.]control.BooleanPicture[ = setting%]

Remarks	Four predefined bitmap styles are available:  settings 0, 1 , 2, and 3.  When the BooleanPicture property is set to UserDefined (4), custom bitmaps can be installed using the PictureFalse, PictureFalseDisabled, PictureFalseDown, PictureTrue, PictureTrueDisabled, PictureTrueDown properties.

The following settings are available:

Setting	Description
0	CheckBox.
1	Option Button.
2	3D CheckBox.
3	3D Option Button.
4	User Defined.
Default	0 (CheckBox)

Data Type	Integer (Enumerated)

Applies To	fpBoolean Control.

See Also	BooleanMode, BooleanStyle Properties.

Example	This example initializes 3 fpBoolean controls to behave as 3-D check boxes.  Any combination of options may be selected at a time.  The current state of the check boxes depends on their group value.

Sub Form_Load ()

'Create a group of dependent check boxes

fpBoolean1.GroupSelect = 1

fpBoolean1.GroupTag = 7

fpBoolean1.Caption = "All Checked"

fpBoolean1.BooleanPicture = 2	'3D Check Box

fpBoolean2.GroupSelect = 1

fpBoolean2.GroupTag = 3

fpBoolean2.Caption = "Bottom 2 Checked"

fpBoolean2.BooleanPicture = 2

fpBoolean3.GroupSelect = 1

fpBoolean3.GroupTag = 1

fpBoolean3.Caption = "Last Checked"

fpBoolean3.BooleanPicture = 2

End Sub


BooleanStyle

Description  Specifies the elements to be displayed within the fpBoolean control.

Usage	[form.]control.BooleanStyle[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	Text w/Bitmap:  Allows text and bitmaps in the control.
1	Text only:  Allows text only in the control.
2	Bitmap only:  Allows bitmaps only in the control.
When the BooleanStyle property is set to Text and Bitmaps (0), the text is selected when the control comes in focus, as is standard for checkbox and radio button controls.  When the BooleanStyle property is set to Text Only (1), the text is selected when the control comes in focus, similarly to the formatted edit controls.  When the BooleanStyle property is set to Bitmap Only (2), the focus box surrounds the bitmap when the control comes in focus.

Default	0 (Text and Bitmap)

Data Type	Integer (Enumerated)

Applies To	fpBoolean Control.

See Also	BooleanPicture, BooleanMode Properties.

Example	Refer to AlignPictureH property and AutoToggle property examples.


BorderColor

Description  Sets or retrieves the color of the border/outline around the control.

Usage 	[form.]control.BorderColor[ = color]

Remarks	Solid colors must be used for the BorderColor.  The BorderWidth and BorderStyle properties must be greater than zero in order to use the BorderColor property.  The border is independent of the 3-D border.

Default	&H80000006& (Windows System Button Highlight Color)

Data Type 	Color

Applies To	All Aware/VBX Controls.

See Also 	BorderStyle, BorderWidth, ThreeDText Properties.

Example	This example uses a subroutine to customize border attributes.  This is an alternate way of initializing multiple controls.

Sub Form_Load ()

Dim s As String

'Initialize borders of text control

SetBorderfpTextBorder1, 0, RGB(0, 0, 0), 0

SetBorderfpTextBorder2, 1, RGB(255, 0, 0), 3

SetBorderfpTextBorder3, 2, RGB(0, 255, 0), 2

SetBorderfpTextBorder4, 3, RGB(0, 0, 255), 1

SetBorderfpTextBorder5, 4, RGB(0, 0, 0), 1

SetBorderfpTextBorder6, 5, RGB(255, 0, 0), 2

SetBorderfpTextBorder7, 6, RGB(0, 0, 255), 1

End Sub

Sub SetBorder (Ctrl As Control, ByVal BorderStyle As Integer, ByVal BorderColor As Long, ByVal BorderWidth As Integer)

'Set the control's BorderStyle, BorderColor and BorderWidth

Ctrl.Redraw = False

Ctrl.BorderStyle = BorderStyle

Ctrl.BorderColor = BorderColor

Ctrl.BorderWidth = BorderWidth

Ctrl.Redraw = True

End Sub


BorderGrayAreaColor

Description  Sets the gray area color of the border of a control to prevent default to the forms BackColor.

Usage	[form.]control.BorderGrayAreaColor[ = color]

Remarks  	Use the BorderGrayAreaColor property to designate a color for the drop shadow when it is not in focus, for the corners of the border when the BorderStyle property is set to 2 (Rounded) or for the 3-D frame when you do not want these colors to default to the back color of the form.

Default 	&H80000005& (Windows System Window Color)

Data Type 	Color

Applies To 	All Aware/VBX Controls except fpComboBox and fpListBox.

See Also 	BorderStyle, DropShadowColor, ThreeDFrameWidth Properties.


BorderStyle

Description  Sets or retrieves the style of the border around the control.

Usage 	[form.]control.BorderStyle[ = setting%]

Remarks 	The BorderWidth property must be greater than zero in order to access the BorderStyle property.  The BorderStyle property, in turn, must be set to 1 - 6 in order for color set with the BorderColor property to be used.  The BorderStyle settings 1 or 2 are recommended when setting a 3-D look for the control.

Setting	Description
0	No Border.
1	Single Line.
2	Rounded.
3	Dash.
4	Dot.
5	Dash Dot.
6	Dash Dot Dot.
Default	1 (Solid Line) for All Aware/VBX Controls except for fpBoolean, which defaults to 0 (No Border).

Data Type 	Integer (Enumerated)

Applies To 	All Aware/VBX Controls.

See Also 	BorderColor, BorderWidth Properties.

Example	Refer to BorderColor property example.


BorderWidth

Description  Sets or retrieves the width of the border around the control in pixels.

Usage 	[form.]control.BorderWidth[ = value%]

Remarks 	The BorderWidth property must be greater than zero in order to see a border and to utilize the BorderColor and BorderStyle properties.  Set the BorderWidth property in conjunction with the ThreeDInsideWidth and ThreeDOutsideWidth properties to achieve the desired 3-D look for the control.  For detailed information on borders, refer to Chapter 2, Special Features, in this manual.

Default	1

Data Type 	Integer

Applies To	All Aware/VBX Controls.

See Also 	BorderColor, BorderStyle, ThreeDInsideWidth, ThreeDOutsideWidth Properties.

Example	Refer to BorderColor property for example.


ButtonDefaultAction

Description  Determines whether to use default behavior for certain buttons in the formatted edit controls.

Usage	[form.]control.ButtonDefaultAction[ = boolean%]

Remarks	When the ButtonDefaultAction property is set to True, button default behavior is implemented for the following controls and button styles:

Control	Button using Default Behavior
fpCurrency	Spin Button (ButtonStyle = 1).
fpDateTime	Spin Button (ButtonStyle = 1).
fpDoubleSingle	Spin Button (ButtonStyle = 1).
fpLongInteger	Spin Button (ButtonStyle = 1).
fpText	Slide Button (ButtonStyle = 4).
You can customize the button behavior for other button styles in these controls by setting the ButtonDefaultAction property to False and adding code to respond to the ButtonHit event.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	False

Data Type	Integer (Boolean)

Applies To	All Formatted Edit Control except for fpMask.

See Also	ButtonWrap, IncDec, IncHoriz, IncInt Properties.

Example	This example sets default button behavior, allowing the user to select a value between -10 and 10 in increments of .25 (i.e., -10.0, -9.75 . . . 9.75, 10.0).

Sub Form_Load ()

fpLong1.ButtonDefaultAction = True	'Allow button default behavior

fpLong1.ControlType = 1	'Read only control

fpLong1.ButtonWrap = True	'Set button to wrap

fpLong1.IncDec = .25	'Increment by decimals of .25

fpLong1.IncInt = 1	'Increment by integers of 1

fpLong1.MaxValue = 10	'Set maximum value to 10

fpLong1.MinValue = -10	'Set minimum value to -10

End Sub


ButtonDisable

Description  Allows the user to disable the button within a control.

Usage	[form.]control.ButtonDisable[ = boolean%]

Remarks	When the ButtonDisable property is set to True, the button is disabled independently of the rest of the control.  Use the ControlType and Enabled properties to set editing or enabling capabilities for the rest of the control.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	False

Data Type	Integer (Boolean)

Applies To	Formatted Edit Controls.

See Also	ButtonStyle, ControlType, Enabled Properties.


ButtonHide

Description  Detrmines whether the button in the control is hidden when the control is out of focus.

Usage	[form.]control.ButtonHide[ = boolean%]

Remarks	When the ButtonHide property is set to True, the button is not displayed when the control is out of focus.

When the ButtonHide property is set to False (the default value), the button is always displayed in the control.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	False

Data Type	Integer (Boolean)

Applies To	Formatted Edit Controls.

See Also	ButtonStyle, ControlType, Enabled Properties.


ButtonIncrement

Description  Sets the increment or value by which the ButtonIndex in the control increments or decrements.

Usage	[form.]control.ButtonIncrement[ = value%]

Remarks	The ButtonIncrement property specifies the value that the ButtonIndex increments or decrements when a button of any style is hit.  The ButtonIncrement property increments the index up to or down to the range set by the ButtonMax and ButtonMin properties.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Use the IncDec, IncHoriz, and IncInt properties to set the increment for the ButtonDefaultAction.

Default	1

Data Type	Integer

Applies To	Formatted Edit Controls.

See Also	ButtonIndex, ButtonMax, ButtonMin, ButtonWrap Properties.

Example	This example establishes a spin button to cycle through the holidays of the year.

Sub Form_Load ()

Dim holidays() As String

ReDim holidays(11)	'Resize holiday string array

'Initialize string array

holidays(0) = "New Year's Day"

holidays(1) = "Valentines Day"

holidays(2) = "Easter"

holidays(3) = "Mother's Day"

holidays(4) = "Memorial Day"

holidays(5) = "4th of July"

holidays(6) = " Labor Day"

holidays(7) = "Halloween"

holidays(8) = "Thanksgiving"

holidays(9) = "Christmas"

holidays(10) = "New Year's Eve"

fpText1.ButtonStyle = 1	'Set button style to spin

fpText1.Text = holidays(0)	'Set text display

fpText1.ControlType = 1	'Prevent content modification

fpText1.OnFocusNoSelect = True	'Set onfocus text selection

'Spin button cycles through holidays

fpText1.ButtonIncrement = 1	'Spin one at a time

fpText1.ButtonMin = 0	'Set minimum index

fpText1.ButtonMax = 10	'Set maximum index

fpText1.ButtonWidth = 0 	'Set button width to default

fpText1.ButtonWrap = True	'Wrap at max or min

fpText1.ButtonDefaultAction = True	'Use button default behavior

End Sub

Sub fpText1_ButtonHit (Button As Integer, NewIndex As Integer)

Dim Direction As String

fpText1.Text = holidays(NewIndex) 	'Display month in text control

End Sub


ButtonIndex

Description  Returns the index of the button in the control.

Usage	[form.]control.ButtonIndex[ = value%]

Remarks	The ButtonIndex property increases or decreases by the value of the ButtonIncrement property each time a button is hit, and is limited to the range set by the ButtonMax and ButtonMin properties.  The ButtonIndex increases when the UP spin arrow, popup or right slide buttons are hit.  The ButtonIndex decreases each time the DOWN spin, dropdown, or left slide buttons are hit.

The ButtonIndex is independent of the contents of the control and can be used to customize button behavior.  The ButtonIndex property is not available at design time.

For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Data Type	Integer

Applies To	Formatted Edit Controls.

See Also	ButtonIncrement, ButtonMax, ButtonMin, ButtonWrap Properties.

Example	Refer to the ButtonIncrement property example.


ButtonMax
ButtonMax, ButtonMin

Description  Specify the minimum or maximum values for the button index in a control.

Usage	[form.]control.ButtonMax [ = value%]

[form.]control.ButtonMin [ = value%]

Remarks	The ButtonMax and ButtonMin properties limit the range of the ButtonIndex property when the ButtonWrap property is set to True.  The following behavior applies:

1.    The ButtonIndex wraps from the value set by the ButtonMax property to the value set by the ButtonMin property when a button hit increments to a value greater than the ButtonMax value.

2.    The ButtonIndex wraps from the value set by the ButtonMin property to the value set by the ButtonMax property when a button hit decrements to a value less than the ButtonMin value.

For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	0 for ButtonMin, 100 for ButtonMax

Data Type	Integer

Applies To	Formatted Edit Controls.

See Also	ButtonIncrement, ButtonIndex, ButtonWrap Properties.

Example	Refer to the ButtonIncrement property example.


ButtonStyle

Description  Sets the type of button to be used in the control.

Usage	[form.]control.ButtonStyle[ = setting%]

Remarks	The following ButtonStyle property settings are available:

Setting	Description
0	None.
1	Spin. Note:  Button default behavior is available for the spin button style in the fpCurrency, fpDoubleSingle, and fpLongInteger controls by setting the ButtonDefaultAction property to True.
2	PopUp (Ellipse button).
3	DropDown.
4	Slide. Note:  Button default behavior is available for the slide button style in the fpText control by setting the ButtonDefaultAction property to True.
Button styles can be used in many ways to create a customized button behavior.  For example, you can set the ButtonStyle property to 1 (Spin) to increment and decrement numeric values, or set the ButtonStyle property to 2 (PopUp) to display a popup dialog.  Set the ButtonStyle property to 3 (DropDown) to emulate dropdown listboxes, or to 4 (Slide) to scroll horizontally through data.

For detailed information on button behavior, refer to the section Button Behavior in Chapter 2 of this manual.

Default	0 (None)

Data Type	Integer (Enumerated)

Applies To	Formatted Edit Controls.

See Also	ButtonDefaultAction Property.

Example	This example sets a popup button in an fpText control to display a dialog asking the user to enter a number.

Sub Form_Load ()

fpText1.ButtonStyle = 2	'Set button style to PopUp

fpText1.Text = ""	'Text is empty string

End Sub

Sub fpText1_ButtonHit (Button As Integer, NewIndex As Integer)

Dim answer

answer = InputBox$("Please enter a number :", "Aware/VBX")

fpText1.Text = answer

End Sub


ButtonWidth

Description  Sets or retrieves the width of the button(s).  The units match the scale mode of the form.

Usage	[form.]control.ButtonWidth[ = value!]

Remarks	The ButtonWidth property affects the appearance of the button(s).  When the ButtonWidth is set to 0 (the default value), the ButtonWidth is computed as follows:

Button Style	Width Calculation
Spin (ButtonStyle = 1):	Automatically computes the width of spin buttons as two thirds of the controls height.
All other ButtonStyles:	Automatically computes the width of the button as equal to the controls height.
For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	0

Data Type	Single

Applies To	Formatted Edit Controls.

See Also	ButtonStyle Property.

Example	Refer to the ButtonIncrement property example.


ButtonWrap

Description  Controls the wrapping of the ButtonIndex or the button default behavior in the control.

Usage	[form.]control.ButtonWrap [ = boolean%]

Remarks	When the ButtonWrap property is set to True, the following behavior occurs:

1.    The ButtonIndex and Value wrap from the ButtonMax value to the ButtonMin value when a button hit increments to a value greater than the ButtonMax value.

2.    The ButtonIndex and Value wrap from the ButtonMin property to the ButtonMax value when a button hit decrements to a value less than the ButtonMin value.

When the ButtonWrap property is set to False (the default value), the ButtonIndex and Value do not wrap and a UserError event fires as follows:

    When the ButtonDefaultAction property is True, the UserError event fires when the Value reaches the MinValue or MaxValue property value.

    When the ButtonDefaultAction property is False, the UserError event fires when the ButtonIndex reaches the ButtonMax or ButtonMin property value.

For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	False

Data Type	Integer (Boolean)

Applies To	fpCurrency, fpDateTime, fpDoubleSingle, fpLongInteger, fpText Controls.

See Also	ButtonDefaultAction, ButtonIndex, ButtonMax, ButtonMin, MaxValue, MinValue, Value (Formatted Edit) Properties., UserError Event.

Example	Refer to the ButtonIncrement property example.


Caption

Description  Sets the default text displayed.

Usage	[form.]control.Caption[ = text$]

Remarks 	The Caption property is identical to the TextFalse property and is included for compatibility with the RadioButton and CheckBox controls from Visual Basic.

Default	Empty String

Data Type 	String

Applies To	fpBoolean Control.

See Also	TextFalse Property.

Example	This example initializes 3 boolean controls to behave as 3-D option by assigning the same GroupId.

Sub Form_Load ()

'Create a group of option buttons

fpBoolean2.GroupSelect = 3

fpBoolean2.GroupId = 1

fpBoolean2.Caption = "East"

fpBoolean2BooleanPicture = 3	'3D Option button

fpBoolean3.GroupSelect = 3

fpBoolean3.GroupId = 1

fpBoolean3Caption = "Central"

fpBoolean3BooleanPicture = 3

fpBoolean4.GroupSelect = 3

fpBoolean4.GroupId = 1

fpBoolean4.Caption = "West"

fpBoolean4.BooleanPicture = 3

End Sub


CaretInsert
CaretInsert, CaretOverWrite

Description  Sets the type of caret displayed in the control when the control is in insert or overwrite mode.

Usage	[form.]control.CaretInsert[ = setting%]

[form.]control.CaretOverWrite[ = setting%]

Remarks 	The CaretInsert and CaretOverWrite properties set the type of carets displayed when entering data in the Insert and Overwrite edit modes, respectively.  You can use different caret types for Overwrite mode and Insert mode to visually indicate the current editing mode to the user.  The user can toggle between Insert and Overwrite modes with the <Insert> key.  The ChangeMode event is fired each time the edit mode is changed.

Setting	Description
0	Single.
1	Double.
2	Block.
3	Underline.
4	Triangle.
Default	0 (Single) for CaretInsert, 3 (Underline) for CaretOverWrite

Data Type	Integer (Enumerated)

Applies To	Formatted Edit Controls.

See Also	UserEntry Property., ChangeMode Event.

Example	This example sets an fpMemo control to display a double line caret in Insert mode, and a block caret in Overwrite mode, giving the user the feel and look of a word processing program.  The OnFocusNoSelect property does not highlight the entire control when it first receives focus.

Sub Form_Load ()

fpMemo1.CaretInsert = 1	'Double insert caret

fpMemo1.CaretOverWrite = 2	'Block overwrite caret

fpMemo1.FontName = "Courier New"	'Set font to Courier New

fpMemo1.FontSize = "10"	'Set font size to 10 point

fpMemo1.OnFocusNoSelect = True	'Set no selection on focus

End Sub


CharPositionLeft
CharPositionLeft, CharPositionRight

Description  Sets or retrieves the index of the farmost character displayed in the upper left/ lower right of the control, respectively.

Usage	[form.]control.CharPositionLeft[ = value&]

[form.]control.CharPositionRight[ = value&]

Remarks	The CharPositionRight and CharPositionLeft properties return the index of the visible characters in the control.  This index is the numerical position of a character in the control in relation to the other characters.  Often a control displays a specific number of characters on the screen for the control, and the other characters are not visible.  The CharPositionLeft and CharPositionRight properties establish which characters are being displayed in the control according to their numerical position.  The CharPositionLeft property returns the numerical position of the furthest left character displayed on the screen.  The CharPositionRight property returns the numerical position of the furthest right character displayed on the screen.  These properties are not available at design time.

Data Type	Long

Applies To	Formatted Edit Controls.

See Also	Index Property.

Example	This example searches for a specified word and, if found, positions the word to be visible in the control.

Sub Search_Click ()

Dim X As Integer

Dim Length As Integer

'Check for selected text and retrieve length of found text

x = Instr (fpText2.Text,fpText1.Text)

length = Len (fpText2.Text)

'If text is found in the first half of the search buffer

If X < (Length / 2) Then

'Position the "found" text on the left side

fpText2.CharPositionLeft = X - 1

fpText2.SelStart = X - 1

fpText2.SelLength = Len(fpText1.Text)

Else

'Position the "found" text on the right side

fpText2.CharPositionRight = X + Len(fpText1.Text) - 1

fpText2.SelStart = X - 1

fpText2.SelLength = Len(fpText1.Text)

End If

End Sub


CharValidationText

Description  Allows/Prevents a limited character entry string for a control.

Usage	[form.]control.CharValidationText[ = text$]

Remarks	The CharValidationText property restricts the data entered by the user in a control.  While similar to setting an input mask for a control, the CharValidationText property is simpler, because specific placeholders are not given for each character, nor are literals used.  For example, the application may set the CharValidationText string to "ABCD", thus limiting the text entered to those four characters.  A valid text entry could be "AABBCADDB" or "BBCC" in this example.

The amount of text entered and the specific index of each character do not matter; the only limiting factor is that the text entered be one of the keyboard characters designated in the string.  In the above example, any character entered in the control besides "ABCD" will generate InvalidData and UserError events.

The CharValidationText string may also designate characters which are not permitted into the data field of the control.  By setting the first character in the string to a tilda (~), the string represents the character(s) not permitted entry into the control.  For example, if a program requested serial numbers, the CharValidationText string could be set as "~IO01", preventing the characters I, O, 0, and 1 from use as part of a valid serial number.

Default	Empty String

Data Type	String

Applies To	fpText

See Also	InvalidOption, Mask, MaskChar, Text, UnFmtText, UserEntry Properties., UserError Events.

Example	This example sets the background color of the control to red when invalid text characters (I,1,O, and 0) are entered into the control and the control loses focus.

Sub Form_Load ()

fpDateTime1.InvalidColor = RGB(255, 0, 0)	'Red as invalid color

fpDateTime1.InvalidOption = 0	'Show invalid data

fpDateTime1.UserEntry = 0	'Formatted data entry

fpDateTime1.CharValidationText = "~I1O0"	'Restricted characters

End Sub


ClipMode

Description  Determines whether to include or exclude the literal characters in the input mask when executing a cut or copy command.

Usage	[form.]control.ClipMode[ = setting%]

Remarks	When mask text is copied to the clipboard, it may be copied with or without the literals.  When the ClipMode property is set to True, the contents of the mask are copied to the clipboard exactly as the contents appear in the mask.  For example, a mask input field set for phone numbers such as (555)444-4653 would send the number with the literal characters ( , ), and - to the clipboard.  If the ClipMode property is set to False, the phone number would be sent to the Clipboard as numbers only, so the contents of the clipboard would be 5554444653.

Setting	Description
0	Clip Data and Literals:  Clips data and returns mask with literals.
1	Clip Data w/out Literals:  Clips data and returns mask without literals.
Note:  The ClipMode property has no effect if the Mask property is set to the empty string.  Use the DataFormat property to exclude literal characters when data is written to a data control.

Default	0 (Clip with Literals)

Data Type	Integer (Enumerated)

Applies To	fpMask Control.

See Also	Action, DataFormat, NoSpecialKeys, Mask, Text, UnFmtText, Value (Formatted Edit) Properties.


ClockMode

Description  Determines whether the clock in an fpClock control keeps time as a 12 hour clock, a 24 hour clock, or a stopwatch.

Usage	[form.]control.ClockMode[ = setting%]

Remarks	The ClockMode property determines how the time is calculated in an fpClock control.  Use the ClockStyle property to determine the visual appearance of the clock.  The following settings for the ClockMode property are available:

Setting	Description
0	[Intl]:  Returns the International Setting based on your Windows system configuration (12 or 24 Hour).
1	12 Hour:  Calculates the time as a 12 hour clock.
2	24 Hour:  Calculates the time as a 24 hour clock.
3	Stopwatch:  Supports time from 0 to 99 hours.
Default	0, Returns the International Setting based on your Windows system configuration.

Data Type	Integer (Enumerated)

Applies To	fpClock

See Also	ClockStyle Property.

Example	This example initializes three clocks:  Clock 1 displays the current time and clock 2 displays the time when the application began.  Clock 3, a stopwatch,  displays the amount of time that has elapsed since the application began and can exceed 24 hours.

Sub Form_Load ()

fpClock2.AutoUpdate = False

fpClock3.ClockMode = 3	'StopWatch

fpClock3.AutoUpdate = False

fpClock1.StartTime = fpClock1.CurrentTime

fpClock2.CurrentTime = fpClock1.StartTime

End Sub

SubfpClock1_Change ()

fpClock3.CurrentTime = fpClock1.ElapsedTime

End Sub


ClockStyle

Description  Determines the look of the clock in an fpClock control.

Usage	[form.]control.ClockStyle[ = setting%]

Remarks	The ClockStyle property determines the actual appearance of the Clock.  The following settings are available:

Setting	Description
0	Default: Returns standard font setting determined by your Windows system configuration.
1	Digital: Clock appears as digits only.
2	Analog: Clock appears as a traditional clock face with hour and minute hands.
Default	0 , returns standard font setting determined by your Windows system configuration.

Data Type	Integer (Enumerated)

Applies To	fpClock

See Also	ClockMode Property.

Example	Refer to AlarmTime property example.


Col

Description  Sets or returns the desired column in fpComboBox and fpListBox controls.

Usage	[form.]control.Col [ = value%]

Remarks	The Col property determines the column on which an operation occurs as specified by the Col properties (see list below).  The Col property and its associated properties are for use with multiple column comboboxes and listboxes only.  Set the number of columns you want in a combobox or listbox with the Columns property.

Note:  When the WrapList property is True, no Col properties are used, regardless of the Columns property setting.  The WrapList property is available in the fpListBox control only.

Default	0

Data Type	Integer

Applies To	fpComboBox, fpListBox Controls.

See Also	ColAlignH, ColHeaderAlignH, ColDataField, ColFieldType, ColFormat, ColHide, ColList, ColSorted, ColSortSequence, ColText, ColWidth Properties.

Example	This example binds the edit and list portions of a combobox to different data controls and sets the display data for the specific columns.

Sub Form_Load ()

'Bind combo list and edit parts to different data controls

'Bind list part (columns bound to fields below) (design time)

fpcombobox1.DataSourceList = data1

'Bind edit part(design time)

fpcombobox1.DataSource = data2

fpcombobox1.DataField = "SSN"

'Set Column Properties.

fpcombobox1.Columns = 3

'Make column width unit the average character width

fpcombobox1.ColumnWidthScale = 2	'avg char

'Copy data from the first column to the edit field

fpcombobox1.ColumnEdit = 0	'first column

'Set Header Properties.

fpcombobox1.HeaderShow = True

fpcombobox1.Header3DStyle = 2	'lowered

fpcombobox1.HeaderBackColor = G_LIGHT_GRAY

'Set Col Properties

'Override default column headings, specify column

'widths, and assign data fields

'Column 0: SSN

fpcombobox1.Col = 0

fpcombobox1.ColHeaderText = "Customer ID"

fpcombobox1.ColWidth = 12

fpcombobox1.ColDataField = "SSN"

'Column 1: Name

fpcombobox1.Col = 1

fpcombobox1.ColHeaderText = "Customer Name"

fpcombobox1.ColWidth = 30

fpcombobox1.ColDataField = "Name"

'Column 2: Phone

fpcombobox1.Col = 2

fpcombobox1.ColHeaderText = "Phone Number"

fpcombobox1.ColWidth = 15

fpcombobox1.ColDataField = "Phone"

End Sub


ColAlignH

Description  Sets or returns the horizontal alignment of text in each column.

Usage	[form.]control.ColAlignH[ = setting%]

Remarks	You must specify a column with the Col property before you set the ColAlignH property.  The ColAlignH property applies to text in the list portion of the control.  You must set the alignment of the header text separately with the ColHeaderAlignH property.  The following settings are available:

Setting	Description
0	Left:  Left justifies text in the column.
1	Center:  Centers the text in the column.
2	Right:  Right justifies text in the column.
Default	0 (Left Justify)

Data Type	Integer (Enumerated)

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, ColHeaderAlignH Properties.

Example	Refer to Columns property example.


ColDataField

Description  Binds a specific column in an fpComboBox or fpListBox control to a data field.

Usage	[form.]control.ColDataField[ = fieldname]

Remarks	Use the ColDataField property with multiple column comboboxes and listboxes.  Specify a column with the Col property before you set the ColDataField property.  Set the field type of the data field for the column you wish to bind with the ColFieldType property (default field type is Text).

For more information on how to bind a data field, refer to the DataField property in Visual Basics Language Reference.

The ColDataField property is read/write at both design time and run time.  For more information on how to bind a data field, refer to the DataField property in Visual Basics Language Reference.

Data Type	String

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, ColFieldType, DataField Properties.

Example	Refer to Col property example.


ColFieldType

Description  Sets or retrieves the type of bound data for a specific column in an fpComboBox or fpListBox control.

Usage	[form.]control.ColFieldType[ = setting%]

Remarks	Use the ColFieldType property with multiple column comboboxes and listboxes.  Specify a column with the Col property before you set the ColFieldType property.  Set the data field for the column you wish to bind with the ColDataField property.

The following field types are available:

Setting	Field Type
1	Boolean.
2	Byte.
3	Integer.
4	Long.
5	Currency.
6	Single.
7	Double.
8	Date/Time.
10	Text.
For the edit portion of a combobox or a single column listbox, use the FieldType property to set the data field type.

Default 	10 (Text)

Data Type	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.

See Also	Col, ColDataField, DataField, DataSource, FieldType Properties.


ColFormat

Description  Sets or returns the format string used for data display in a column.

Usage	[form.]control.ColFormat[ = text$]

Remarks	The formatting changes affect data display. only, not the actual data in the data field.  You must specify a column with the Col property before you set the ColFormat property.  See the Visual Basic Format$ function for valid format strings.

Data Type	String

Applies To	fpComboBox, fpListBox Controls.

See Also	Col Property.


ColHeaderAlignH

Description  Sets or returns the horizontal alignment of the header text in each column.

Usage	[form.]control.ColAlignH[ = setting%]

Remarks	You must specify a column with the Col property before you set the ColHeaderAlignH property.  The ColHeaderAlignH property only applies to the header text of the control.  You can set the alignment of text in the list and static or edit portions of the control separately with the ColAlignH property.  The following settings are available:

Setting	Description
0	Default:  matches the header alignment to the text alignment.
1	Left:  left justifies text in the column.
2	Center:  centers the text in the column.
3	Right:  right justifies text in the column.
Default	0 (default)

Data Type	Integer (Enumerated)

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, ColAlignH, ColHeaderText, HeaderShow Properties.


ColHeaderText

Description  Sets or returns the text to display in a column header in fpComboBox and fpListBox controls.

Usage 	[form.]control.ColHeaderText[ = text$]

Remarks 	You must specify a column with the Col property before you set the ColHeaderText property string.  The HeaderShow property must be True to display the header(s).  When the column is bound to a datafield, but no header text provided, the control automatically uses the data field name for the column as the header text.

Default	Empty String

Data Type 	String

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Col, ColHeaderAlignH, HeaderShow Properties.

Example	Refer to Col property example.


ColHide

Description  Determines whether to display a column in fpComboBox and fpListBox controls.

Usage 	[form.]control.ColHide[ = boolean%]

Remarks	You must specify a column with the Col property before you set the ColHide property.  Setting the ColHide property to True is the same as setting the ColWidth to 0.  You can use this property when you want to sort on a specific column without displaying it.

Default	False

Data Type 	Integer (Boolean)

Applies To 	fpComboBox, fpListBox Controls.

See Also	Col, ColWidth Properties.

Example	Refer to Columns property example.


ColList

Description  Returns the specified row and column text from the list portion of fpComboBox and fpListBox controls.

Usage 	[form.]control.ColList

Remarks 	Use the ColList property to access list items when the Columns property is greater than 0.  You must specify the column and row with the Col and Row properties before you access the ColList property.  The ColList property is read only.

Note:  The ColList property is used with multiple column comboboxes and listboxes.  Use the List property with single column comboboxes and listboxes.

Default	Empty String

Data Type 	String

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Col, Row Properties.


ColSorted

Description  Sets or returns the type of sort on a column in a multiple column listbox or combobox.

Usage	[form.]control.ColSorted[ = setting%]

Remarks	You must specify a column with the Col property before you set the ColSorted property.  The ColSorted property is identical to the Sorted property but is used for multiple column comboboxes.  The following settings are available:

Setting	Description
0	None.
1	Ascending.
2	Descending.
Note:  Changing this property at run time will destroy the contents of the combobox.

Default	0 (None)

Data Type	Integer (Enumerated)

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, ColSortSequence, Sorted property

Example	Refer to Columns property example.


ColSortSequence

Description  Specifies the sort order of the data by column in the fpComboBox control.

Usage	[form.]control.ColSortSequence[ = setting%]

Remarks	You must specify a column with the Col property before you set the ColSortSequence property.  Columns are sequenced 0-based, with 0 designating the first sort column, 1 designating the second column, 2 designating the next column, etc.  To order the columns, each columns ColSorted property should be set to ascending or descending, and the ColSortSequence property to the proper sequence number.

Default	-1, indicates that no sorting is to occur on the specific column

Data Type	Integer

Applies To	fpComboBox Control.

See Also	Col, ColSorted Properties.

Example	Refer to Columns property example.


ColText

Description  Returns the specific column's worth of information from the top (edit or static) portion of fpComboBox and fpListBox controls.

Usage 	[form.]control.ColText

Remarks 	You must specify a column with the Col property before you set the ColText property.  Use this property to read the actual string contained in the edit area of the control.  The ColText property is read only.

Default	Empty String

Data Type 	String

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Col Property.


ColumnEdit

Description  Retrieves the data displayed in the edit portion of an fpComboBox control to a single column.

Usage	[form.]control.ColumnEdit[ = value%]

Remarks	You must set the ColumnEdit property to the appropriate column when you want a single column displayed in the edit portion of the combobox, regardless of whether the control is bound or not.  When all columns are displayed, each column is separated by the ColumnSeparatorChar.

Default	-1, places all columns in the edit portion.

Data Type	Integer

Applies To	fpComboBox Control.

See Also	Columns Property.

Example	Refer to Col property example.


Columns

Description  Determines the number of columns desired in fpComboBox and fpListBox controls.

Usage	[form.]control.Columns [ = value%]

Remarks	When the number of columns set by the Columns property is greater than 0, the Col properties are used to dictate display for each column.

Note:  When the WrapList property is True, no Col properties are used, regardless of the Columns property setting.  The WrapList property is available in the fpListBox control only.

Default	0, sets the control properties to dictate data display (rather than the Col properties).

Data Type	Integer

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, WrapList Properties.

Example	This example sets up a 5 column combobox and sorts both the hidden and visible columns.

Sub Form_Load ()

'Set Column Properties.

fpcombobox1.Columns = 5	'five columns

fpcombobox1.HeaderShow = False	'no headers

'Set Col Properties, specify alignment and sort on hidden columns

'Column 0

fpcombobox1.Col = 0

fpcombobox1.ColAlignH = 0

fpcombobox1.ColSorted = 0

'Column 1

fpcombobox1.Col = 1

fpcombobox1.ColAlignH = 1	'center

fpcombobox1.ColSorted = 0

'Column 2

fpcombobox1.Col = 2

fpcombobox1.ColAlignH = 2	'right

fpcombobox1.ColSorted = 0

'Column 3

fpcombobox1.Col = 3

fpcombobox1.ColSorted = 1

fpcombobox1.ColSortSequence = 0

fpcombobox1.ColHide = True

'Column 4

fpcombobox1.Col = 4

fpcombobox1.ColSorted = 1

fpcombobox1.ColSortSequence = 1

fpcombobox1.ColHide = True

End Sub


ColumnSeparatorChar

Description  Sets or returns the character used to separate string data into columns (applied to all columns) in fpComboBox and fpListBox controls.

Usage	[form.]control.ColumnSeparatorChar[ = text$]

Remarks	The developer must use this character when adding multiple column data via the AddItem method.  Data in multiple columns is separated by this character in the output portion of the control after the user makes a selection.

The string set as the separator character is limited to a single character.  Use the Visual Basic Chr$() when the character is not available on the keyboard.

Default	9 (Tab Character)

Data Type	String

Applies To	fpComboBox, fpListBox Controls.

See Also	AddItem Method.


ColumnWidthScale

Description  Sets the measurement scale used to set column widths in the fpListBox and fpComboBox controls.

Usage	[form.]control.ColumnWidthScale[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	Twips:  Sets the unit measurement for column width to twips.
1	Pixels:  Sets the unit measurement for column width to pixels.
2	Avg Char Width:  Sets the measurement for column width to the average character width of the text in the column.
3	Max Char Width:  Sets the measurement for column width to the maximum character width of the text in the column.
The FontName and FontSize properties must be set before setting the ColumnWidthScale property to 2 (Average Character Width) or 3 (Maximum Character Width).

Default	0 (Twips)

Data Type	Integer (Enumerated)

Applies To	fpComboBox, fpListBox Controls.

See Also	FontName, FontSize Properties.

Example	Refer to Col property example.


ColWidth

Description  Sets the width of a column in fpComboBox and fpListBox controls.

Usage	[form.]control.ColWidth[ = value&]

Remarks	You must specify a column with the Col property before you set the ColWidth property.  The width returned by the ColWidth property is based on the measurement unit set in the ColumnWidthScale property.

Default	1

Data Type	Long

Applies To	fpComboBox, fpListBox Controls.

See Also	ColumnWidthScale Properties.

Example	Refer to Col property example.


ComboListWidth

Description  Sets or returns the width of the list portion in an fpComboBox control in twips.

Usage	[form.]control.ComboListWidth[ = value%]

Remarks	The ComboListWidth property does not apply when the Style property is set to 0 (Simple Combo).

When the ComboListWidth property setting is less than the sum of the column widths set for display, the far right column(s) are truncated.  Use the horizontal scroll bar when the ComboListWidth is less than the sum of the column widths.

Default	1

Data Type	Integer

Applies To	fpComboBox Control.

See Also	ColumnWidthScale, ScrollBars (fpComboBox, Style Properties.


ControlType

Description  Allows a control to be static or read only.

Usage	[form.]control.ControlType[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	None.
1	ReadOnly:  Allows the user to set focus on the control but the user cannot modify the contents of the control.
2	Static:  Informs the control to display non-editable text.  Focus may not be set to the control, but mouse events will fire.
Note:  The TabStop property is set to False when the ControlType property is set to 2 (Static) and is returned to True when the ControlType property is changed from 2 (Static) to 0 (None) or 1 (ReadOnly).

Default	0 (None)

Data Type	Integer (Enumerated)

Applies To	Formatted Edit Controls.

See Also	Enabled, TabStop Property.


CurrencyDecimalPlaces

Description  Sets or retrieves the number of digits used for the fractional part of a currency amount in the fpCurrency control.

Usage 	[form.]control.CurrencyDecimalPlaces[ = value%]

Remarks	If the value entered in the control contains more decimal places than the number set by the CurrencyDecimalPlaces property, the precise value is maintained until edited, but only the specified number of decimal places are visible in the control.

When the UserEntry property is set to 0 (FreeFormat), the precise value entered by the user is maintained by the control until the user edits the value.  Upon editing, the precision returned is limited to the number of visible decimal places.  When the control loses focus, the value is formatted to display only the number of decimal places specified.  If the FixedPoint property is True, the CurrencyDecimalPlaces property specifies the exact number of decimal places to display.

When using the Value property to return the unformatted value of the control, precision of the value is maintained as long as the value has not been edited.

Note:  The CurrencyDecimalPlaces property and the DecimalPlaces property are the same except that a different International Setting exists for each.

Default	-1, returns the International Setting based on your Windows system configuration.

Data Type	Integer

Applies To	fpCurrency Control.

See Also	DecimalPlaces, DecimalPoint, FixedPoint, UserEntry, Value Properties.

Example	This example establishes the parameters for an fpCurrency control.

Sub Form_Load ()

'Set decimal precision, decimal point, currency sign, separator, 'symbol, min and max values

fpDouble1.CurrencyDecimalPlaces = 4

fpDouble1.FixedPoint = True

fpDouble1. MaxValue= "5000"

fpDouble1.MinValue = "-5000"

fpDouble1.UseSeparator = True

fpDouble1.NegToggle = False	'Minus key does not toggle value

fpDouble1.LeadZero = 2	'Lead zero for values >-1 and <1

End Sub


CurrencyNegFormat

Description  Sets or retrieves the negative format for fpCurrency controls.

Usage	[form.]control.CurrencyNegFormat[ = setting%]

Remarks	The CurrencyNegFormat property sets the display format of a negative currency value in the control.  The dollar sign ($) below represents any currency symbol set by the CurrencySymbol property.  The following settings are available:

Currency Negative Format Setting	Description
0	[Intl]:  Returns the International Setting based on your Windows system configuration.
1	($1)
2	-$1
3	$-1
4	$1-
5	(1$)
6	-1$
7	1-$
8	1$-
9	-1 $
10	-$ 1
11	$ 1-
Note:  The symbol placement specified by the CurrencyNegFormat property may differ from the symbol placement set by the CurrencyPlacement property. These properties specify symbol placement for negative and positive values, respectively. Be consistent.

Default	0, returns the International Setting based on your Windows system configuration.

Data Type	Integer (Enumerated)

Applies To	fpCurrency Control.

See Also	CurrencyPlacement, CurrencySymbol, NegToggle Properties.

Example	This example establishes the English Pound as the currency format.  Chr$(163) is the ASCII character value for the pound sign £.

Sub Form_Load ()

'Set currency format for English Pound

fpCurrencyEnglishPound.CurrencyDecimalPlaces = 2

fpCurrencyEnglishPound.CurrencyNegFormat = 1 	'($1)

fpCurrencyEnglishPound.CurrencySymbol = Chr$(163)

fpCurrencyEnglishPound.UseSeparator = True

fpCurrencyEnglishPound.Separator = ","

fpCurrencyEnglishPound.DecimalPoint = "."

'Set the minus key "-" to toggle the negative state of the value

fpCurrencyEnglishPound.NegToggle = True

'Set the current value

fpCurrencyEnglishPound.Value = 123.45

End Sub


CurrencyPlacement

Description  Sets where the symbol is to be placed in relation to the currency value for positive currency values.

Usage	[form.]control.CurrencyPlacement[ = setting%]

Remarks 	The CurrencyPlacement property customizes the placement of the currency symbol in the fpCurrency control for positive values.  It allows the user to put the symbol in the proper position for the type of currency being entered into the control.

Setting	Description
0	[Intl]:  Returns the International Setting based on your Windows system configuration.
1	$1
2	1$
3	$ 1
4	1 $
Note:  The symbol placement specified by the CurrencyNegFormat property may differ from the symbol placement set by the CurrencyPlacement property. These properties specify symbol placement for negative and positive values, respectively. Be consistent.

Default 	0, Returns the International Setting based on your Windows system configuration.

Data Type 	Integer (Enumerated)

Applies To 	fpCurrency Control.

See Also	CurrencyNegFormat, CurrencySymbol Properties.


CurrencySymbol

Description  Sets the symbol to be used as the currency symbol in the control.

Usage 	[form.]control.CurrencySymbol[ = text$]

Remarks 	Up to 6 characters can be used for the symbol string set by the CurrencySymbol property.

Note:  Do not use numeric values to represent the currency symbol as they may produce unexpected results.

Default 	Empty string, returns the International Setting based on your Windows system configuration.

Data Type 	String

Applies To 	fpCurrency Control.

See Also	CurrencyPlacement Property.

Example	Refer to CurrencyNegFmt property example.


CurrentDate

Description  Sets or retrieves the current date in the calendar.

Usage	[form.]control.CurrentDate[ = text$]

Remarks  	The format of the date is YYYYMMDD.  Invalid data set to the calendar (i. e., data which does not conform to the YYYYMMDD format) is ignored and the calendar maintains its current settings.

You can use the Visual Basic Format$ function to format a date variable to this format.  This format is used rather than Visual Basics automatic string conversion to prevent loss of the appropriate century when the Visual Basic short format does not include century data.

Default 	The current date based on your Windows system configuration.

Data Type 	String

Applies To 	fpCalendar Control.

See Also 	Day, Month, Year Properties.

Example	This example initializes a calendar to display July 14, 1994 as the current date and customize portions of the calendar display.

Sub Form_Load ()

fpCalendar1.CurrentDate = "19940714"

fpCalendar1.MonthHeaderStyle = 1	'Set scrolling months

fpCalendar1.WeekDayHdr = 3	'Set 3 letter header

fpCalendar1.YearHeaderStyle = 2	'Set dropdown years

fpCalendar1.GrayAreaStyle = 2	'Show prev/next days

fpCalendar1.GrayAreaBackColor = RGB(128, 128, 128)

fpCalendar1.GrayAreaForeColor = RGB(255, 0, 8)

End Sub


CurrentPosition

Description  Sets or retrieves the index of the current position of the caret.

Usage	[form]control.CurrentPosition[ = value&]

Remarks 	The CurrentPosition property returns the index of the character the caret is on or sets the index position of the caret to retrieve the character with that specific index.  The index is the numerical position of a character in the control in relation to the other characters.  The index is 0 based.  In a string such as "orangutan," for example, the index for the "o" in the string is 0, while the index for the "g" is 4.  Setting the CurrentPosition property to 5 would place the caret on the character "u" in the control.  The CurrentPosition property is not available at design time.

Data Type 	Long

Applies To 	Formatted Edit Controls.

See Also	Index Property.

Example	This example positions the cursor at the end of the text.  Newly entered text is appended at the end of the old text.

Sub Form_Load ()

Dim length As Integer

fpText1.Text = "Place cursor at end of text"

length = Len(fpText1.Text)

fpText1.CurrentPosition = length + 1

fpText1.OnFocusNoSelect = True

End Sub


CurrentTime

Description  Sets or retrieves the current time in an fpClock control.

Usage	[form.]control.CurrentTime[ = text$]

Remarks  	The CurrentTime property is used to set the current time in a clock control.  The format of the time is set with the TimeScale property.

Default 	The current time based on your Windows system configuration.

Data Type 	String

Applies To 	fpClock Control.

See Also 	AlarmTime, ElapsedTime, StartTime, TimeScale Properties.

Example	Refer to AlarmTime property example.


DataChanged

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.DataChanged[ = boolean%]

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls.

See Also	DataField, DataSource Properties.


DataField

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.DataField[ = fieldname]

Data Type 	String

Applies To 	All Aware/VBX Controls.

See Also	DataChanged, DataSource Properties.


DataFieldList

Description  Binds the list portion of an fpComboBox control to a data field.

Usage	[form.]control.DataFieldList[ = fieldname$]

Remarks 	The DataFieldList property is read/write at design time and run time.  You can set the field type of the data field you wish to bind with the FieldType property.  For more information on how to bind a data field, refer to the DataField property in Visual Basics Language Reference.

Note:  Use the DataField property to bind the edit portion of a combobox.  Use the ColDataField property to bind a multiple column combobox.

Data Type	String

Applies To 	fpComboBox Control.

See Also	ColDataField, DataField, DataSourceList, FieldType Properties.


DataFormat

Description  Determines whether or not to save the data in an fpMask control to the database with literals.

Usage 	[form.]control.DataFormat[ = setting%]

Remarks 	Used with bound controls, the DataFormat property saves space in the database by excluding literal characters from the input mask when data is being sent to a database.  For example, the input mask ###-##-#### for social security numbers uses literal characters (the dashes) as visual cues for data entry.  By setting the DataFormat property to 1, the dashes are not sent to the database; only the raw data is sent.  This saves space and time.

Setting	Description
0	Save Data and Literals:  Save text from mask to database with literal characters.
1	Save Data w/out Literals:  Save text from mask to database without literal characters.
Default 	0 (Data and Literals)

Data Type 	Integer (Enumerated)

Applies To 	fpMask Control.

See Also 	UnFmtText, Mask, MaskChar Properties.


DataSource

Description  Refer to Visual Basic's Language Reference.

Applies To 	All Aware/VBX Controls.

See Also	DataChanged, DataField Properties.


DataSourceList

Description  Determines the data control through which the list portion of the current fpComboBox control is bound to a database.

Usage	[form.]control.DataSourceList[ = fieldname$]

Remarks 	The DataSourceList property is read/write at design time; it is not available at run time.  For more information on determining a data control, refer to the DataSource property in Visual Basics Language Reference.

Data Type	String

Applies To 	fpComboBox Control.

See Also	DataField, DataFieldList, DataSource FieldType Properties.

Example	Refer to Col property example.


DateCalcMethod

Description  Sets or returns the method for calculating missing date and time values in an fpDateTime control.

Usage 	[form.]control.DateCalcMethod[ = setting%]

Remarks 	You can enter a date and/or time into an fpDateTime control which does not match the format set by the DateTimeFormat property and the control will try to fill in the missing data.  The calculation method used by the control to fill in the missing data is determined by the DateCalcMethod property.  The following calculation methods are available:

Setting	Description
0	Current DateTime:  Calculates missing values in the control using the current system date and/or time.
1	User Default DateTime:  Calculates missing values in the control using the default date and time values as specified by the DateDefault and TimeDefault properties, respectively.
2	50/50:  Calculates missing values by finding the nearest match before or after within a month or year designated.  For 50/50 calculations, the middle of the month is always considered to be the 15th.
3	Future:  Calculates missing values by finding the nearest future value which corresponds to the value entered in the control.
Note:  The date and/or time format required by the fpDateTime control must be set with the DateTimeFormat property.

Default 	0 (Current)

Data Type 	Integer (Enumerated)

Applies To	fpDateTime control

See Also 	DateTimeFormat, UserDefinedFormat Properties.

Example	This example creates a time field to display the desired time in a 12 hour format, displaying either am or pm as appropriate.

Sub Form_Load ()

fpDateTime1.DateCalcMethod = 0	'Calculate missing values

'w/current time

fpDateTime1.DateTimeFormat = 4	'Show time only

fpDateTime1.Text = ""	'Set text to empty string

fpDateTime1.TimeString1159 = "am"	'Set morning appendix to am

fpDateTime1.TimeString2359 = "pm"	'Set evening appendix to pm

fpDateTime1.TimeStyle = 1	'Use 12 hour clock

End Sub


DateDefault

Description  Sets or returns the default date used when the DateCalcMethod property is set to 1 (User default).

Usage	[form.]control.DateDefault [ = text$]

Remarks	Use this date value to complete missing values (such as the day or month) in the date when the DateCalcMethod is set to 1 (User Default).  You can set a default time string for completing missing time values by setting the TimeDefault property.

Default	Empty string

Data Type 	String

Applies To	fpDateTime Control.

See Also	DateCalcMethod Property.


DateMax
DateMax, DateMin

Description  Set or retrieve the maximum or minimum range of user-entered dates in the control.

Usage	[form.]control.DateMax[ = text$]

[form.]control.DateMin[ = text$]

Remarks 	The DateMax and DateMin properties set a range of acceptable dates for a control.  The format for assigning a date into the DateMax or DateMin property is YYYYMMDD.  You can use the Visual Basic Format$ Function to format a date variable to this format.  This format is used rather than Visual Basics automatic string conversion to prevent loss of the appropriate century when the Visual Basic short format does not include century data.

You can retrieve and change the maximum and minimum date settings with the DateMax or DateMin properties, respectively.  When a date is entered into the control which is outside the range set by the DateMin and DateMax properties, a UserError event occurs.  Invalid data set to an fpDateTime control (i. e., data which does not conform to the YYYYMMDD format) is ignored and the date and/or time maintains its current settings.

Data Type 	String

Default 	00000000 (No Range)

Applies To 	fpCalendar, fpDateTime Controls.

See Also 	UserError Event.

Example	This example creates a calendar which manually sets the current date, defines Monday as the first day of the week, and establishes start and end dates.

Sub Form_Load ()

'Set alternate method to specify current date

fpCalendar1.Month = 5

fpCalendar1.Day = 20

fpCalendar1.Year = 1995

'Initialize Calendar

fpCalendar1.WeekDayHdr = 1

fpCalendar1.DateMin = "19900101"

fpCalendar1.DateMax = "19991230"

fpCalendar1.GrayAreaStyle = 2

fpCalendar1.GrayAreaBackColor = RGB(0, 0, 0)

fpCalendar1.GrayAreaForeColor = RGB(0, 0, 255)

fpCalendar1.HeaderStyle = 1

fpCalendar1.MonthHeaderStyle = 2

fpCalendar1.YearHeaderStyle = 2

fpCalendar1.FirstDayOfWeek = 1

End Sub


DateTimeFormat

Description  Sets or returns the style of the date and/or time displayed in the field.

Usage	[form.]control.DateTimeFormat[ = setting%]

Remarks	Use the DateTimeFormat propertys five International Settings and one user defined format setting to customize formats of the date and/or time.  When both the date and time are displayed using International settings, they are separated with a space.  The user defined setting displays most standard formats, eliminating the need for LeadZero and Separator properties.  The following settings are available:

Setting	Description
0	Intl Short Date:  Returns the International Setting based on your Windows system configuration for short date only.
1	Intl Long Date:  Returns the International Setting based on your Windows system configuration for long date only.
2	Intl Short Date w/Time:  Returns the International Setting based on your Windows system configuration for short date with time.
3	Intl Long Date w/Time:  Returns the International Setting based on your Windows system configuration for long date with time.
4	Time Only:  Returns the International Setting based on your Windows system configuration for time only.
5	User Defined:  Returns a user defined format for the date and/or time.
Default	0, Returns the International Setting based on your Windows system configuration for short date only.

Data Type 	Integer (Enumerated)

Applies To	fpDateTime Control.

See Also	UserDefinedFormat Properties.

Example	Refer to DateCalcMethod property example.


DateValue

Description  Sets or retrieves the date in an fpDateTime control.

Usage	[form.]control.DateValue[ = text$]

Remarks  	The format of the date depends on the setting of the DateTime Format property.  Invalid data set to an fpDateTime control (i. e., data which does not conform to the format of the DateTimeFormat property) is ignored and the control maintains its current settings.  The DateValue property is not available at design time.

Data Type 	String

Applies To 	fpDateTime Control.

See Also 	TimeValue Property.


Day
Day, Month, Year

Description  Sets or returns the selected day, month or year, respectively.

Usage	[form.]control.Day[ = setting%]

[form.]control.Month[ = setting%]

[form.]control.Year[ = setting%]

Remarks 	You can also use the CurrentDate property to retrieve or set the date in an fpCalendar control, and the DateValue property to set the date in an fpDateTime control; however, the specific Day, Month,or Year property values are preferable when only one part of the date is being set or retrieved.  The Day, Month and Year properties are not available at design time.

Data Type 	Integer

Applies To 	fpCalendar, fpDateTime Controls.

See Also 	CurrentDate Property.

Example	Refer to DateMax, DateMin properties example


DecimalPlaces

Description  Sets or retrieves the number of decimal places to the right of the decimal point.

Usage	[form.]control.DecimalPlaces[ = value%]

Remarks	If the value entered in the control contains more decimal places than the number set by the DecimalPlaces property, the precise value is maintained until edited, but only the specified number of decimal places are visible in the control.

When the UserEntry property is set to 1 (FreeFormat), the precise value entered by the user is maintained by the control until the user edits the value.  Upon editing, the precision returned is limited to the number of visible decimal places.  When the control loses focus, the value is formatted to display only the number of decimal places specified.  If the FixedPoint property is True, the DecimalPlaces property specifies the exact number of decimal places to display.

When using the Value property to return the unformatted value of the control, precision of the value is maintained as long as the value has not been edited.

Note:  The CurrencyDecimalPlaces property and the DecimalPlaces property are the same except that a different International Setting exists for each.

Default 	-1, Returns the International Setting based on your Windows system configuration.

Data Type 	Integer

Applies To 	fpDoubleSingle Control.

See Also 	CurrencyDecimalPlaces, DecimalPoint, UserEntry Properties.

Example	This example initializes an fpDoubleSingle control to always display 4 decimal places and use custom separator and decimal point characters

Sub Form_Load ()

'Set variables for double control

fpDoubleMinMax.NegFormat = 1 	'-1

fpDoubleMinMax.MaxValue = "5000"

fpDoubleMinMax.MinValue = "-5000"

fpDoubleMinMax.UseSeparator = True

fpDoubleMinMax.Separator = "/"

fpDoubleMinMax.FixedPoint = True	'Display 4 decimal places

fpDoubleMinMax.DecimalPlaces = 4

fpDoubleMinMax.DecimalPoint = "#"

fpDoubleMinMax.NegToggle = False

End Sub


DecimalPoint

Description  Sets or retrieves the character used to represent the decimal point in numeric controls.

Usage 	[form.]control.DecimalPoint[ = text$]

Remarks 	The string set by the DecimalPoint property is limited to a single character.  Use the Visual Basic Chr$() function to prevent the character selected as the decimal point from being typed in using the keyboard.

Note:  The DecimalPoint string cannot be a numeric value.

Default 	Blank, Returns the International Setting for the decimal point character based on your Windows system configuration.

Data Type 	String

Applies To 	fpCurrency, fpDoubleSingle Controls.

See Also 	DecimalPlaces Property.

Example	Refer to DecimalPlaces property example.


DragIcon

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.DragIcon[ = icon]

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


DragMode

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.DragMode[ = mode]

Data Type 	Integer (Enumerated)

Applies To 	All Aware/VBX Controls.


DropShadowColor

Description  Sets the on focus color of the drop shadow of a control.

Usage 	[form.]control.DropShadowColor[ = color]

Remarks 	The DropShadowColor property sets the color of the drop shadow when the control is in focus and the OnFocusShadow property is set to True.  The drop shadow is visible to the right of the right border and below the bottom border, outside of the border of the control.

When the control is not in focus, the area occupied by the drop shadow is painted the same color as the BackColor of the form.  To make the drop shadow a different color than the BackColor of the form when the control is not in focus, you can set this color with the BorderGrayAreaColor property.

Default 	&H80000010& (Windows System Button Shadow Color)

Data Type 	Color

Applies To  	All Aware/VBX Controls.

See Also  	DropShadowWidth, OnFocusShadow Properties.

Example	This example initializes a control to display a custom drop shadow upon receiving focus.

Sub Form_Load ()

fpTextPhoneNumber.OnFocusShadow = True

fpTextPhoneNumber.DropShadowColor = RGB(128, 128, 128) fpTextPhoneNumber.DropShadowWidth = 3

End Sub


DropShadowWidth

Description  Sets the DropShadow width of the control in pixels.

Usage 	[form.]control.DropShadowWidth[ = value%]

Remarks 	The DropShadowWidth property sets the width of the drop shadow when the OnFocusShadow property is True.  Refer to the OnFocusShadow property for more details.

Note:  The DropShadowWidth selected affects the size of the client area of the control.  Make sure you take the DropShadowWidth property into account before you set the properties within the client area of the control to avoid sizing errors.

Default 	3 pixels

Data Type 	Integer

Applies To 	All Aware/VBX Controls.

See Also 	DropShadowColor, OnFocusShadow Properties.

Example	Refer to DropShadowColor property example.


ElapsedTime

Description  Retrieves how much time has elapsed between the start time and the current time in an fpClock control.

Usage	[form.]control.ElapsedTime[ = text$]

Remarks  	The string returned by the ElapsedTime property is equal to the difference between the string set by the StartTime property and the string set by the CurrentTime property.  The format of this string is set using the TimeScale property.  The ElapsedTime property is available at run time only.

Default 	Empty string

Data Type 	String

Applies To 	fpClock Control.

See Also 	AlarmTime, CurrentTime, StartTime, TimeScale Properties.

Example	This example initializes three clocks:  Clock 1 displays the current time, clock 2 displays the time when the application began, and clock 3 displays the amount of time that has elapsed since the application began.

Sub Form_Load ()

fpClock2.AutoUpdate = False

fpClock3.ClockMode = 3	'StopWatch

fpClock3.AutoUpdate = False

fpClock1.StartTime = fpClock1.CurrentTime

fpClock2.CurrentTime = fpClock1.StartTime

End Sub

SubfpClock1_Change ()

fpClock3.CurrentTime = fpClock1.ElapsedTime

End Sub


Element

Description  Sets or retrieves the current desired element in the fpCalendar control.

Usage	[form.]control.Element[ = setting%]

Remarks	Select or retrieve an element of an fpCalendar control with the Element property, then set the properties for that particular element with the other element properties.  The following element settings are available:

Setting	Description
0-Default	Sets the default properties for color, style, etc.  Any element not assigned particular values for color and style uses the default properties assigned here.  The font properties also use these defaults at design time.
1-Month	Selects the month title at the top of the calendar.
2-Days	Selects all days of the month.
3-Year	Selects the Year title at the top of the calendar.
4-WeekDays	Selects the WeekDay titles at the top of the calendar.
5-WeekDayIndex	Used to change the individual weekday names.  The ElementIndex property is then set to the specific weekday from 1 to 7.
6-DaysIndex	Used to change the individual day numbers.  The ElementIndex property is then set to the specific day of the month from 1 to 31.
7-DropDown	Provides an optional DropDown button for the month and/or year titles.  A list drops down with month or year choices.  Colors and fonts may be changed on the month or year selected.
Font properties and all other element properties depend on the Element property.  The element properties are unique to the fpCalendar control.  The Element property is not available at design time.

Default	0, returns default settings for all element properties in the control.

Data Type 	Integer (Enumerated)

Applies To	fpCalendar Control.

See Also	ElementBackColor, ElementForeColor, Element3DHighlightColor, ElementIndex, Element3DShadowColor, Element3DShadowWidth, Element3DStyle, Element3DText, FontBold, FontItalic, FontName, FontSize, FontStrikethru, FontUnderline Properties.

Example	This example changes the foreground, backcolor, and 3-D appearance of the day with the element properties whenever a new day is selected.

SubfpCalendar1_Change (OldMonth As Integer, OldDay As Integer, OldYear As Integer, NewMonth As Integer, NewDay As Integer, NewYear As Integer, Cancel As Integer)

'Select the new day

fpCalendar1.Element = 6

fpCalendar1.ElementIndex = NewDay

'Set the appearance of the new day

fpCalendar1.Element3DStyle = 2

fpCalendar1.Element3DText = 3

fpCalendar1.Element3DShadowWidth = 2

fpCalendar1.Element3DHighlightColor = RGB(255, 0, 0)

fpCalendar1.Element3DShadowColor = RGB(0, 0, 255)

fpCalendar1.ElementBackColor = RGB(0, 0, 0)

fpCalendar1.ElementForeColor = RGB(255, 255, 255)

End Sub


ElementBackColor
ElementBackColor, ElementForeColor

Description  Set the background or foreground color of the desired Element in the fpCalendar control, respectively.

Usage	[form.]control.ElementBackColor[ = color]

[form.]control.ElementForeColor[ = color]

Remarks  	To use the Element3DBackColor and the Element3DForeColor properties:

1.    Select an element with the Element property,

2.    Set the Element3DBackColor and the Element3DForeColor properties to contrasting shades.

The Element3DBackColor and the Element3DForeColor properties are not available at design time.

Default 	&H8000000F& (Windows System Button Face Color) for ElementBackColor, &H80000008& (Windows System Window Text Color) for ElementForeColor

Data Type 	Color

Applies To 	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


Element3DHighlightColor
Element3DHighlightColor, Element3DShadowColor

Description  Set the highlight color and the shadow colors used to create the 3-D effect for the selected Element, respectively.

Usage	[form.]control.Element3DHighlightColor[ = color]

[form.]control.Element3DShadowColor[ = color]

Remarks  	To use the Element3DHighlightColor and Element3DShadowColor properties:

1.    Select an element with the Element property,

2.    Select a 3-D effect with the Element3DStyle property, and

3.    Set the Element3DHighlightColor and the Element3DShadowColor properties to contrasting shades.

The Element3DHighlightColor and Element3DShadowColor properties are not available at design time.

Default 	&H80000014& (Windows System Button Highlight Color) for Element3DHighlightColor, &H80000010& (Windows System Button Shadow Color) for Element3DShadowColor

Data Type 	Color

Applies To 	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


Element3DShadowWidth

Description  Sets the width of the shadow used to create the 3-D effect for the selected Element in the fpCalendar control, using pixels.

Usage 	[form.]control.Element3DShadowWidth[ = value%]

Remarks 	To use the Element3DShadowWidth property:

1.    Select an element with the Element property,

2.    Select a 3-D effect using the Element3DStyle property,

3.    Set the width with the Element3DShadowWidth property in reference to the size of the selected Element.

The Element3DShadowWidth property is not available at design time.

Default	1 pixel

Data Type 	Integer

Applies To 	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


Element3DStyle

Description  Sets or retrieves the 3-D style of the selected Element in the fpCalendar control.

Usage	[form.]control.Element3DStyle[ = setting%]

Remarks 	To use the Element3DStyle property,

1.    Select an element with the Element property,

2.    Select a 3-D effect for that element based on the settings below:

Setting	Description
0	None: no 3-D appearance is used.
1	In: 3-D appearance is projected in.
2	Out: 3-D appearance is projected out.
At design time, the Element3DStyle property setting of 0 (None) is applied to all calendar elements.  At run time, the Element3DStyle property must be set for each element independently.

Default 	0 (None)

Data Type 	Integer (Enumerated)

Applies To	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


Element3DText

Description  Sets or retrieves the 3-D appearance of the text of the selected Element in the fpCalendar control.

Usage	[form.]control.Element3DText[ = setting%]

Remarks	To use the Element3DText property:

1.    Select an element with the Element property,

2.    Select a 3-D look for the text of that element based on the settings below:

The following settings are available:

Setting	Description
0	None: No 3-D appearance is used.
1	Etched.
2	Embossed.
3	Etched w/shading.
4	Embossed w/shading.
At design time, the Element3DText property setting of 0 (None) is applied to all calendar elements.  At run time, it must be set for each element independently.

Default	0 (None)

Data Type 	Integer (Enumerated)

Applies To 	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


ElementIndex

Description  Specifies a specific weekday or day of the month in the fpCalendar control.

Usage	[form.]control.ElementIndex[ = setting%]

Remarks  	The ElementIndex property allows you to set specific characteristics for a weekday or month day in a control.  To use the ElementIndex property:

1.    Set the Element property to 5 (Weekday Index) or 6 (Days Index),

2.    Specify the desired weekday (from 1-7) or the desired day of the month (from 1-31) with the ElementIndex property

3.    Use the other element properties to set custom characteristics for the selected day.

The ElementIndex property is not available at design time.

Data Type 	Integer

Applies To 	fpCalendar Control.

See Also 	Element Property.

Example	Refer to Element property example.


Enabled

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.Enabled[ = boolean%]

Remarks	Note that the Enabled property must be set to True in order for the OnFocus properties to function.

Applies To 	All Aware/VBX Controls.

See Also 	ControlType Property.


FieldType

Description  Sets or retrieves the type of bound data expected in the edit portion of a combobox or in a single column listbox.

Usage	[form.]control. FieldType[ = setting%]

Remarks	Use the FieldType property with single column comboboxes and listboxes.  Set the data field for the column you wish to bind with the DataField property.

The following field types are available:

Setting	Field Type
1	Boolean.
2	Byte.
3	Integer.
4	Long.
5	Currency.
6	Single.
7	Double.
8	Date/Time.
10	Text.
Use the ColFieldType property to set the field type for multiple column comboboxes or listboxes.

Default 	10 (Text)

Data Type	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.

See Also	ColFieldType, DataField, DataSource Properties.


FirstDayOfWeek

Description  Sets or retrieves the first day of the week displayed in the fpCalendar control.

Usage	[form.]control.FirstDayOfWeek[ = setting%]

Remarks 	The following settings are available:

Setting	Description
0	Sets the first day of the week as Sunday.
1	Sets the first day of the week as Monday.
Default 	0 (Sunday)

Data Type	Integer (Enumerated)

Applies To 	fpCalendar Control.

See Also	WeekDayHdr Property.

Example	This example creates a calendar which manually sets the current date, defines Monday as the first day of the week, and establishes start and end dates.

Sub Form_Load ()

'Alternate way of specifying current date

fpCalendar1.Month = 5

fpCalendar1.Day = 20

fpCalendar1.Year = 1995

'Initialize Calendar

fpCalendar1.WeekDayHdr = 1

fpCalendar1.MinDate = "19900101"

fpCalendar1.MaxDate = "19991230"

fpCalendar1.GrayAreaStyle = 2

fpCalendar1.GrayAreaBackColor = RGB(0, 0, 0)

fpCalendar1.GrayAreaForeColor = RGB(0, 0, 255)

fpCalendar1.HeaderStyle = 1

fpCalendar1.MonthHeaderStyle = 2

fpCalendar1.YearHeaderStyle = 2

fpCalendar1.FirstDayOfWeek = 1

End Sub


FixedPoint

Description  Determines whether to display place holding zeros to the right of the decimal point.

Usage 	[form.]control.FixedPoint[ = boolean%]

Remarks 	When the FixedPoint property is set to True, the number of decimal places set by the DecimalPlaces property is always shown, including place holding zeros.  For example, if FixedPoint = True, and DecimalPlaces = 6, the number 2.405 would be displayed in the control as 2.405000.

When the FixedPoint property is set to False, the actual number of decimal places used are displayed, up to the number designated by the DecimalPlaces property.  Trailing zeros are not displayed as placeholders.  For example, if FixedPoint = False and DecimalPlaces = 6, the number 2.405 would be displayed as 2.405.

The number of decimal places displayed is always determined by the DecimalPlaces property.  If the value entered has more places than the number set by the DecimalPlaces property and the UserEntry property is set to 1 (FreeFormat), the extra decimal places are not displayed on the screen, even though precision of the number is maintained.

Default 	True for fpCurrency, False for fpDoubleSingle.

Data Type 	Integer (Boolean)

Applies To 	fpDoubleSingle, fpCurrency Controls.

See Also 	CurrencyDecimalPlaces, DecimalPlaces Properties.

Example	Refer to the CurrencyDecimalPlaces property example.


FontBold
FontBold, FontItalic, FontStrikethru, FontUnderline

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.FontBold[ = boolean%]

[form.]control.FontItalic[ = boolean%]

[form.]control.FontStrikethru[ = boolean%]

[form.]control.FontUnderline[ = boolean%]

Note:  Changing the font properties for the fpComboBox control after reading in the data will destroy the contents of the combobox.

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls.


FontName

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.FontName[ = font]

Data Type 	String

Applies To 	All Aware/VBX Controls.


FontSize

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.FontSize[ = points]

Remarks:	The fpClock control automatically sets the font size of the clock depending on the control size.

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


ForeColor

See BackColor


GrayAreaBackColor
GrayAreaBackColor, GrayAreaForeColor

Description  Sets or retrieves the background or foreground color of the gray area in the fpCalendar control.

Usage 	[form.]control.GrayAreaBackColor[ = color]

[form.]control.GrayAreaForeColor[ = color]

Remarks 	The gray area refers to the empty day spaces on the monthly calendar before the first day of the month and after the last day of the month.  You can set the style of the gray area with the GrayAreaStyle property.

The GrayAreaBackColor and GrayAreaForeColor properties fill in the gray areas as follows:

     When the GrayAreaStyle property is set to 0 (Solid), the gray area is a solid color set by the GrayAreaBackColor property.

     When the GrayAreaStyle property is set to 1 (Pinstriped), the gray area alternates the foreground and background colors using the GrayAreaBackColor and the GrayAreaForeColor properties displayed for a pinstriped effect.

     When the GrayAreaStyle property is set to 2 (Previous/Next), the gray area displays the days of the previous and following months.  The GrayAreaForeColor property sets the color of the dates.  The GrayAreaBackColor property sets the background color of the gray area.

Default 	&H8000000F& (Windows System Button Face Color) for GrayAreaBackColor, &H80000008& (Windows System Window Text Color) for GrayAreaForeColor

Data Type 	Color

Applies To 	fpCalendar Control.

See Also 	GrayAreaStyle Property.

Example	This example initializes a calendar to display July 14, 1994 as the current date and customize portions of the calendar display.

Sub Form_Load ()

fpCalendar1.CurrentDate = "19940714"

fpCalendar1.MonthHeaderStyle = 1	'Set scrolling months

fpCalendar1.WeekDayHdr = 3	'Set 3 letter header

fpCalendar1.YearHeaderStyle = 2	'Set dropdown years

fpCalendar1.GrayAreaStyle = 2	'Show prev/next days

fpCalendar1.GrayAreaBackColor = RGB(128, 128, 128)

fpCalendar1.GrayAreaForeColor = RGB(255, 0, 8)

End Sub


GrayAreaStyle

Description  Sets or retrieves the style of the gray area in the fpCalendar control.

Usage	[form.]control.GrayAreaStyle[ = setting%]

Remarks 	The gray area in an fpCalendar control refers to the empty day spaces on the monthly calendar before the first day of the month and after the last day of the month.  Colors are set with the GrayAreaBackColor and the GrayAreaForeColor properties.

The following settings are available:

Setting	Description
0	Solid: Displays the gray area as a solid color.  Use the GrayAreaBackColor property to set the color.
1	Pinstripe: Displays the gray area with a pinstriped effect by alternating the foreground and background colors using the GrayAreaBackColor and the GrayAreaForeColor properties.
2	Show Prev/Next: Displays the days of the previous and following months.  Use the GrayAreaForeColor property to set the color of the dates.  Use the GrayAreaBackColor property to set the background color of the gray area.
Default 	1 (Pinstripe)

Data Type 	Integer (Enumerated)

Applies To 	fpCalendar Control.

See Also 	GrayAreaBackColor, GrayAreaForeColor Properties.

Example	Refer to GrayAreaBackColor, GrayAreaForeColor properties example.


GroupID

Description  Sets or returns the group identifier number for a set of fpBoolean controls.

Usage	[form.]control.GroupID[ = value%]

Remarks	The GroupID property allows the boolean controls to be grouped together and function interdependently.  All fpBoolean controls on one form with the same GroupID are in the same group.  When the GroupSelect property is set to one and only one, the boolean controls in the group behave like group radio buttons; where only one control can be selected at a time.  Therefore, when one control in the group is toggled to True, all other controls in the group are toggled to False.  When the GroupSelect property is set to one or more, the boolean controls in the group behave like a group of checkboxes, where one or more of the controls in the group may be toggled to True at the same time.

Default	0

Data Type	Integer

Applies To	fpBoolean Control.

See Also	GroupSelect, GroupValue Properties.

Example	This example initializes 3 boolean controls to behave as 3-D option buttons by assigning the same GroupId and setting GroupSelect to one and only one.

Sub Form_Load ()

'Create a group of radio buttons on the same group box

fpBoolean2.GroupSelect = 3

fpBoolean2.GroupId = 1

fpBoolean2.Caption = "East"

fpBoolean2BooleanPicture = 3	'3D Option button

fpBoolean3.GroupSelect = 3

fpBoolean3.GroupId = 1

fpBoolean3Caption = "Central"

fpBoolean3BooleanPicture = 3

fpBoolean4.GroupSelect = 3

fpBoolean4.GroupId = 1

fpBoolean4.Caption = "West"

fpBoolean4.BooleanPicture = 3

End Sub


GroupSelect

Description  Sets or returns the selection rule enforced on groups of fpBoolean controls.

Usage	[form.]control.GroupSelect[ = setting%]

Remarks	The GroupSelect property determines the manner in which the controls in a group work together.  All of the controls in a group (as set by the GroupID property) adhere to the option set with the GroupSelect property.

The following settings are available:

Setting	Description
0	No Rule.
1	Any Combination:  Allows any combination of controls to be selected.
2	No more than One:  Prevents more than one control in the group from being selected at a time.
3	One and Only One:  Allows one and only one control in the group to be selected.  For example, when one control is selected as True, all of the other enabled controls in the group are automatically toggled to False.
4	One or More:  Allows one or more controls in the group to be selected at a time.  For example, when one control is selected as True, another one may also be selected as True, while the other controls in the group remain False or Disabled.
Default	0 (No Rule)

Data Type	Integer (Enumerated)

Applies To	fpBoolean Control.

See Also	GroupID, GroupValue, Value (fpBoolean) Properties.

Example	Refer to GroupId property example.


GroupTag

Description  Sets or returns the value used to uniquely identify an fpBoolean control in a group.

Usage	[form.]control.GroupTag[ = value&]

Remarks	The GroupTag property assigns a unique value to an fpBoolean control that is a member of a group.  This GroupTag for each control is used to determine the state of each control in a group, and therefore to compute the value of the group as a whole (represented by the GroupValue property).

When the group permits only a single selection (GroupSelect = 1,3) the GroupTag of the selected control becomes the value of the group.  To compute the state of any single control in the group, the GroupTag is compared to the GroupValue.  If the two values are equal, the state of the control is True.

When the group permits multiple selections (GroupSelect = 2, 4), the GroupTag values of all selected controls are ored together to compute the value of the group.  To compute the state of any single control in the group, the GroupTag is anded with the group.  If the result is equivalent to the GroupTag, the state of the control is True.

When a group of fpBoolean controls are bound to the same numeric field in a database, the computed GroupValue is written to the database.

Data Type	Long

Applies To	fpBoolean Control.

See Also	GroupID, GroupSelect, Value (fpBoolean)  Properties.

Example	This example creates a group of option buttons, assigns a unique GroupTag to each option, then prevents new selection by setting a new GroupValue.

Sub Form_Load ()

'Initialize text

fpText2.Text = "Which are FarPoint Products?"

fpBoolean2(0).Text = "A. Spread/VBX"

fpBoolean2(1).Text = "B. Tab/VBX"

fpBoolean2(2).Text = "C. Aware/VBX"

fpBoolean2(3).Text = "D. All of the Above"

'Define booleans to display option buttons

For i = 0 To 3

fpBoolean2(i).BooleanPicture = 1

Next i

'Assign the same group ID

For i = 0 To 3

fpBoolean2(i).GroupSelect = 4

Next i

'Assign different group tags

fpBoolean2(0).GroupTag = 1

fpBoolean2(1).GroupTag = 2

fpBoolean2(2).GroupTag = 4

fpBoolean2(3).GroupTag = 7

'Set group value to no selection

fpBoolean2(0).GroupValue = 0

End Sub


GroupValue

Description  Sets or returns the computed value for a group of fpBoolean controls.

Usage	[form.]control.GroupValue[ = value&]

Remarks	The GroupValue property sets or returns the computed value of a group of fpBoolean controls.  The GroupValue is equivalent for all controls in a group.  Use the GroupID property to assign controls to a particular group.

When the group permits only a single selection (GroupSelect = 1,3), the GroupValue is equivalent to the GroupTag of the selected control in the group.

When the group permits multiple selections (GroupSelect = 2, 4), the GroupTag values of all selected controls are ored together to compute the GroupValue property.  When the GroupTag and the GroupValue equal the GroupTag, the state of the control is True.

When a group of fpBoolean controls are bound to the same numeric field in a database, the computed GroupValue is written to the database.  The GroupValue property is not available at design time.

Data Type	Long

Applies To	fpBoolean Control.

See Also	GroupID, GroupSelect, Value (fpBoolean)  Properties.

Example	Refer to GroupTag property example.


Header3DHighlightColor
Header3DHighlightColor, Header3DShadowColor

Description  Sets the 3-D highlight and 3-D shadow colors for the headers in fpComboBox and fpListBox controls.

Usage	[form.]control.Header3DHighlightColor[ = color]

[form.]control.Header3DShadowColor[ = color]

Remarks	The Header3DHighlightColor and Header3DShadowColor properties are used to create a 3-D effect when the Header3DStyle property setting is greater than 0.  See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default	&H80000014& (Windows System Button Highlight Color) for Header3DHighlightColor, &H80000010& (Windows System Button Shadow Color) for Header3DShadowColor

Data Type	Color

Applies To	fpComboBox, fpListBox Controls.

See Also	Header3DStyle Property.


Header3DStyle

Description  Sets or retrieves the 3-D style of the header in fpComboBox and fpListbox controls.

Usage	[form.]control.Header3DStyle[ =setting%]

Remarks 	The 3-D header style is set in conjunction with the 3DFrameWidth property for the most dramatic 3-D effect.  See the section Setting 3-D Borders in Chapter 2 for more details.  The following settings are available:

Setting	Description
0	None: No 3D Style.
1	Solid.
2	Lowered:  Shadow color used to color the bottom and right border sides, highlight color used to color the top and left border sides.
3	Raised:  Shadow color used to color the top and left border sides, highlight color used to color the bottom and right border sides.
See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default	0 (None)

Data Type 	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Header3DWidth Property.

Example	Refer to Col property example.


Header3DText

Description  Sets or retrieves the 3-D appearance of the header text in fpComboBox and fpListBox controls.

Usage 	[form.]control.Header3DText[ = setting%]

Remarks 	The Header3DText property allows the user to set a 3-D appearance for the header text in the control.  See the section Setting 3-D Text in Chapter 2 for more details.

Setting	Description
0	None: No 3-D appearance is used.
1	Etched.
2	Embossed.
3	Etched w/shading.
4	Embossed w/shading.
Default 	0 (None)

Data Type 	Integer (Enumerated)

Applies To  	fpComboBox, fpListBox Controls.

See Also 	Header3DTextHighlightColor, Header3DTextShadowColor, Header3DTextOffset Properties.


Header3DTextHighlightColor
Header3DTextHighlightColor, Header3DTextShadowColor

Description  Set the highlight and shadow colors for the header text in fpComboBox and fpListBox controls.

Usage 	[form.]control.Header3DTextHighlightColor[ = color]

[form.]control.Header3DTextShadowColor[ = color]

Remarks 	The Header3DTextHighlightColor and Header3DTextShadowColor properties are used to create a 3-D effect when the Header3DText property setting is greater than 0.  The Header3DTextHighlightColor property is usually set to a light shade while the Header3DTextShadowColor property is set to a dark shade to achieve the 3-D effect.  See the section Setting 3-D Text in Chapter 2 for more details.

Default 	&H80000014& (Windows System Button Highlight Color) for Header3DTextHighlightColor, &H80000010& (Windows System Button Shadow Color) for Header3DTextShadowColor

Data Type 	Color

Applies To 	fpComboBox, fpListBox Controls.

See Also  	Header3DText, Header3DTextOffset Properties.


Header3DTextOffset

Description  Sets the number of pixels that the shadow behind the header text is offset in fpComboBox and fpListBox controls.

Usage 	[form.]control.Header3DTextOffset[ = value%]

Remarks 	The Header3DTextOffset property sets the width for the shadow and highlight to make the header text appear more raised or lowered as needed.  As a general rule, the larger the font size, the larger the offset should be.  See the section Setting 3-D Text in Chapter 2 for more details.

Default	1 pixel

Data Type 	Integer

Applies To  	fpComboBox, fpListBox Controls.

See Also  	Header3DText, Header3DTextHighlightColor, Header3DTextShadowColor Properties.


Header3DWidth

Description  Sets or retrieves the 3-D width of the header lines in fpComboBox and fpListBox controls in pixels.

Usage 	[form.]control.Header3DWidth[ =setting%]

Remarks 	The highlight and shadow lines of the header are drawn in the line width set by the Header3DWidth property.  See the section Setting 3-D Text in Chapter 2 for more details.

Default 	0

Data Type 	Integer

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Header3DHighlightColor, Header3DShadowColor, Header3DStyle Properties.


HeaderBackColor
HeaderBackColor, HeaderForeColor

Description  Sets or retrieves the background and text color of the header, respectively, in fpComboBox and fpListBox controls.

Usage	[form.]control.HeaderBackColor[ = value&]

[form.]control.HeaderForeColor[ = value&]

Remarks 	The background and text colors of the rest of the control can be set with the BackColor and ForeColor properties.

Default 	&H8000000F& (Windows System Button Face Color) Light gray for HeaderBackColor, &H80000008& (Windows System Window Text Color) Black for HeaderForeColor

Data Type 	Color

Applies To 	fpComboBox, fpListBox Controls.

See Also 	HeaderShow Property.

Example	Refer to Col property example.


HeaderFontBold
HeaderFontBold, HeaderFontItalic, HeaderFontName, HeaderFontSize, HeaderFontStrike, HeaderFontUnder

Description  Determines the font styles of the header in fpComboBox and fpListBox controls.

Usage	[form.]control.HeaderFontBold[ = setting%]

[form.]control.HeaderFontItalic[ = setting%]

[form.]control.HeaderFontName[ = text$]

[form.]control.HeaderFontSize[ = value!]

[form.]control.HeaderFontStrike[ = setting%]

[form.]control.HeaderFontUnder[ = setting%]

Remarks 	The HeaderFont properties are equivalent to the Visual Basic Font properties but apply to the header text in the fpComboBox and fpListBox controls only.  Refer to Visual Basics Language Reference for more information on Font properties.

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Font Properties.


HeaderHeight

Description  Sets or retrieves the height of the header in fpComboBox and fpListBox controls.

Usage	[form.]control.HeaderHeight[ = value&]

Remarks 	The user value for the HeaderHeight property must be in twips.

Default 	-1, bases the height of the header on the font height.

Data Type 	Long

Applies To 	fpComboBox, fpListBox Controls.

See Also 	HeaderShow Property.


HeaderShow

Description  Determines whether to show the header in fpComboBox and fpListBox controls.

Usage	[form.]control.HeaderShow[ = boolean%]

Remarks 	When the HeaderShow property is True, a header is shown for every column in the control.  The empty string is displayed as the column header unless:

1.	Text is designated by the ColHeaderText property, or

2.	The column is bound to a datafield.  In this situation, the control automatically supplies the data field name for the column as the header text.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpComboBox, fpListBox Controls.

See Also 	ColHeaderText Property.

Example	Refer to Col property example.


HeaderStyle

Description  Sets or retrieves the style of the calendar header in the fpCalendar control.

Usage	[form.]control.HeaderStyle[ = setting%]

Remarks 	You can use the HeaderStyle property to customize the header at the top of the calendar.  The header can display both the calendar year and the calendar month at the top of the calendar on one line or two lines, or display neither.

Note:  The MonthHeaderStyle and YearHeaderStyle properties allow the user to scroll through or drop down month and year options in the header.  It is important to note, however, that when the HeaderStyle property is set to 0 (None), it overrides the settings of the MonthHeaderStyle and YearHeaderStyle properties.  You must set the HeaderStyle property to a setting greater than 0 in order to access the scroll and dropdown buttons provided by the MonthHeaderStyle and YearHeaderStyle properties.

The HeaderStyle property setting does not effect the WeekDayHdrStyle property settings.

The following settings are available:

Setting	Description
0	None: No header displayed at the top of the calendar.
1	1 Line:  One line header display with the month on the left and the year on the right, both with scroll buttons.
2	2 Line:  Two line header display with the year on the first line and the month on the second line.
Default 	2 (Two Line Header)

Data Type 	Integer (Enumerated)

Applies To 	fpCalendar Control.

See Also 	MonthHeaderStyle, YearHeaderStyle Properties.


Height

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.Height[ = value%]

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


HelpContextID

Description  Assigns an associated context number for an object.

Usage	[form.]control.HelpContextID[ = value&]

Remarks	Use the HelpContextID property to assign a context number to an object and its associated help topic.  For more information, refer to the HelpContextID property in Visual Basic's Language Reference.

Data Type 	fpLongInteger

Applies To 	All Aware/VBX Controls.


HideSelection

Description  Specifies whether selected text remains highlighted when the control is not in focus.

Usage	[form.]control.HideSelection

Remarks	The HideSelection property is read only at run time.  For more information, refer to the HideSelection property in Visual Basic's Language Reference.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	Formatted Edit Controls.

See Also	OnFocusNoSelect Property.


hWnd

Description  Specifies a handle to the control.

Usage	[form.][control.]hWnd

Remarks	Use the hWnd property with Window API calls.  The hWnd property is not available at design time and is read only at run time.  For more information, refer to the hWnd property in Visual Basic's Language Reference.

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


Hour
Hour, Min, Sec

Description  Sets or returns the selected hour, minute, or second, respectively.

Usage	[form.]control.Hour[ = value%]

[form.]control.Min[ = value%]

[form.]control.Sec[ = value%]

Remarks 	The TimeValue or DateValue properties may also be used to retrieve or set the time; however, the specific Hour, Min, or Sec property values are preferable when only one part of the time is being set or retrieved.  The Hour, Min, and Sec properties are not available at design time.

Data Type 	Integer

Applies To 	fpClock, fpDateTime Controls.

See Also 	TimeValue Property.


IncDec

Description  Sets or returns the multiple by which the number in a floating point control increments/decrements when the caret is to the right of the decimal point and the button is clicked.

Usage	[form.]control.IncDec[ = value!]

Remarks	The IncDec property is independent of the IncInt property.  If the same movement is desired, regardless of caret position, the setting of the IncDec property should equal the setting of the IncInt property.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Note:  The IncDec property is not available for fpLongInteger controls because the control does not support floating point values.

Default	1

Data Type	Single

Applies To	fpCurrency, fpDoubleSingle Controls.

See Also	ButtonDefaultAction, IncInt Properties.

Example	This example uses IncInt and IncDec properties on a spin button.  When the spin button is clicked and the caret is to the left of the decimal point, the value is changed by 10.5.  When the spin button is clicked and the caret is to the right of the decimal point, the value is changed by .5.

Sub Form_Load ()

fpDoubleMinMax.IncInt = "10.5"	'Increment for integer portion

fpDoubleMinMax.IncDec = ".5"	'Increment for decimal portion

End Sub


IncHoriz

Description  Sets or returns the number of characters by which the caret in an fpText control increments/decrements when the button is clicked.

Usage	[form.]control.IncHoriz[ = value!]

Remarks	The value of the IncHoriz property determines the horizontal scrolling behavior in the control as follows:

IncHoriz Value	Horizontal Scrolling Behavior
0 (default value).	Scrolls through the control by an increment equal to one quarter the width of the control upon each button click.
Greater than 0 but less than 1.	The number of characters scrolled equals the width in pixels divided by the average character width in the control.  For example, when IncHoriz = .2 the caret scrolls one fifth the width of the control upon each button click.
Greater than or equal to 1.	The value represents the number of characters incremented.  For example, when IncHoriz = 3, the caret scrolls three characters upon each button click.
For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	0

Data Type	Single

Applies To	fpText Control.

See Also	ButtonDefaultAction Property.

Example	This example allows the user to scroll through the text box by pressing one of the slide bars.  When slide buttons are pressed, the cursor will move in the appropriate direction the number of characters specified by the IncHoriz property.

Sub Form_Load ()

'Set text to increment 40 characters at a time

fpText1.Width = 4000

fpText1.Text = "This long line of text can be scrolled through"

fpText1.Text = fpText1.Text + " horizontally by pressing the "

fpText1.Text = fpText1.Text + "left or right slide bar as desired."

fpText1.ButtonStyle = 4	'Slide button

fpText1.IncHoriz = 40

fpText1.OnFocusNoSelect = True

End Sub


IncInt

Description  Sets or returns the multiple by which the number in a numeric control increments/decrements when the caret is to the left of the decimal point and the button is clicked.

Usage	[form.]control.IncInt[ = value&]

Remarks	The IncInt property is independent of the IncDec property.  If the same movement is desired, regardless of caret position, the setting of the IncInt property should equal the setting of the IncDec property.  For detailed information on button behavior, refer to Chapter 2, Special Features, in this manual.

Default	1

Data Type	Long

Applies To	fpCurrency, fpDoubleSingle, fpLongInteger Controls.

See Also	ButtonDefaultAction, IncDec Properties.

Example	Refer to IncDec property example.


Index

Description  Refer to Visual Basic's Language Reference under Index property (control Arrays).

Usage	[form]control[(integer)].Index

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


Interval

Description  Sets or returns the intervals in milliseconds between Timer events.

Usage	[form.]control.Interval[ = value&]

Remarks	When the time interval set by the Interval property passes, a Timer event occurs.  You can set an fpClock controls Interval property at design time or at run time.  The format of the value is determined by the TimeScale property.

Default	1 second

Data Type	Long

Applies To	fpClock Control.

See Also	AutoUpdate, TimeScale Properties., Timer Event.


InvalidColor

Description  Sets or retrieves a designated background color used when the control is not in focus and its contents are invalid.

Usage	[form.]control.InvalidColor[ = color]

Remarks 	Use the InvalidColor property to signify invalid data.  This InvalidColor does not appear as the background of the control until the control loses focus.  If you do not intend to permit the controls to enter an invalid state, set the InvalidColor property to a different color from the back color to aid during development debugging.  Refer to the section, Handling Invalid Data, in Chapter 2 for more details.

Default	&H8000000B& (default to BackColor)

Data Type	Color

Applies To 	Formatted Edit Controls.

See Also 	InvalidOption Property., InvalidData Event.

Example	Refer to the CharValidationText property example.


InvalidOption

Description  Determines the response of the control after invalid data is entered and the control loses focus.

Usage	[form.]control.InvalidOption[ = setting%]

Remarks 	The following settings are available:

Setting	Description
0	Show:  Shows Invalid Data in the control at all times.
1	Hide:  Hides Invalid Data when the control loses focus.  Invalid data reappears upon returning focus to the control.
2	Clear:  Clears Invalid Data from the control.
The status of the data in the control (valid or invalid) may be retrieved using the IsValid property. Refer to the section, Handling Invalid Data, in Chapter 2 for more details.

Default 	0 (Show Data)

Data Type 	Integer (Enumerated)

Applies To 	Formatted Edit Controls.

See Also 	InvalidColor Property., InvalidData Event.

Example	Refer to InvalidColor property example.


IsNull

Description  Returns True if the content of the control is Null.

Usage	[form.]control.IsNull

Remarks 	The AllowNull property must be set to True in order for the IsNull property and other null properties to function.  The IsNull property is not available at design time and is read only at run time.  When the IsNull property is True, the value returned by Text, UnFmtText or Value properties is undefined.  The state of the IsNull property may be changed by setting the Action property to 5 (SetNull), by clearing a field of invalid data when the AllowNull property is set to True, or by pressing <Ctrl+N> on the keyboard when the NoSpecialKeys property is set to 0 or 2.

Data Type 	Integer (Boolean)

Applies To 	Formatted Edit Controls.

See Also 	AllowNull, IsValid, NullColor Properties.


IsValid

Description  Retrieves the status of the data in the control.

Usage	[form.]control.IsValid

Remarks 	You can use the IsValid property to validate the data before displaying it.  Setting invalid data in a control using the Text, Value, and UnFmtText properties does not cause an InvalidData event to be fired.  Instead, the control switches from the Formatted setting of the UserEntry property to the FreeFormat setting.  To prevent this change from occurring, use the IsValid property to check the control after setting the contents and act accordingly.

The IsValid property is always True unless the control is in focus.  The IsValid property is usually returned as True when the InvalidOption property is set to 2 (Clear Data), because the control has been cleared of all invalid data.  In the following cases, however, the IsValid property is returned as False when the InvalidOption property is set to 2 (Clear Data):

1.     When the RequireFill property is set to True in an fpMask control.  In this case, the control remains invalid despite being cleared because the control must contain data in order to be valid.

2.     When a numeric control has been set with a MinValue greater than 0 and a MaxValue less than 0.

When the data in the control is invalid, the IsValid property is False when the InvalidOption property is set to 2 (Hide Data), because the invalid data remains in the control even though it is hidden from view.

When the AllowNull property is True and invalid data is in the control, the control clears all invalid data and sets the content of the control to NULL value.  The IsValid property is not available at design time and is read only at run time.

Data Type 	Integer (Boolean)

Applies To 	Formatted Edit Controls.

See Also 	InvalidOption, IsNull, MaxValue, MinValue, RequireFill Properties., InvalidData Event.


LeadZero

Description  Informs the control to display a leading zero when appropriate.

Usage	[form.]control.LeadZero[ = setting%]

Remarks 	A leading zero holds the ones place in numeric controls, indicating that the number entered is intentionally less than 1.0 and greater than -1.0.  In the fpClock control, the LeadZero property determines whether to display a leading zero for times between 1 and 9 oclock (am or pm) on a twelve hour clock.

The following settings are available:

Setting	Description
0	Returns the International Setting based on your Windows system configuration for the lead zero.
1	Do not use leading zero (.4, for example).
2	Use leading zero (0.4, for example).
Default	0, returns the International Setting based on your Windows system configuration.

Data Type 	Integer (Enumerated)

Applies To 	fpClock, fpCurrency, fpDoubleSingle Controls.

See Also 	DecimalPlaces, DecimalPoint Properties.

Example	This example establishes the parameters for an fpCurrency control.  The control shows a leading zero when appropriate, regardless of the International Setting.

Sub Form_Load ()

'Set decimal precision, decimal point, currency sign, separator, 'symbol, min and max values

fpDouble1.CurrencyDecimalPlaces = 4

fpDouble1.FixedPoint = True

fpDouble1. MaxValue= "5000"

fpDouble1.MinValue = "-5000"

fpDouble1.UseSeparator = True

fpDouble1.NegToggle = False	'Minus key does not toggle value

fpDouble1.LeadZero = 2	'Lead zero for values >-1 and <1

End Sub


Left

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.Left[ = x]

Data Type 	Single

Applies To 	All Aware/VBX Controls.


LineColor

Description  Sets the line color for fpComboBox and fpListBox controls.

Usage	[form.]control.LineColor[ = color]

Remarks	The LineColor property determines the color of the solid lines in an fpComboBox or fpListBox control.  Use the LineStyleH or LineStyleV properties to determine which lines to display.

Default	&H80000008& (Windows System Window Text Color)

Data Type	Color

Applies To	fpComboBox, fpListBox Controls.

See Also	LineStyleH, LineStyleV Properties.


LineCount

Description  Returns the actual number of lines of text in an fpMemo control.

Usage	[form.]control.LineCount

Remarks	The number of lines returned by the LineCount property depends upon the settings of the PageWidth and WordWrap properties, which set the maximum line width for the control and whether text should wrap.  The LineCount property is not available at design time and is read only.

Note:  Set or retrieve the maximum number of lines allowed in an fpMemo control with the LineLimit property.

Data Type	Long

Applies To	fpMemo Control.

See Also	LineLimit, PageWidth Properties.

Example	This example loads text to the printer line by line from an fpMemo control.  The LineCount property is used to retrieve the number of lines to print.

Sub PrintFile ()

fpMemo.TextMode = 3	'Set text entry to line

Load PrintDialog

PrintDialog.Show modeless

On Error GoTo printerror

For i = 0 To fpMemo.LineCount

fpMemo.LineIndex = i

printer.Print fpMemo.Text

Next i

printer.NewPage

printer.EndDoc

printquit:

Unload PrintDialog

Exit Sub

printerror:

Resume printquit

End Sub


LineHighlightColor
LineHighlightColor, LineShadowColor

Description  Set the line highlight and shadow colors, respectively, for fpComboBox and fpListBox controls.

Usage	[form.]control.LineHighlightColor[ = color]

[form.]control.LineShadowColor[ = color]

Remarks	Use the LineShadowColor and LineHighlightColor properties to create a 3-D effect when either the LineStyleH or LineStyleV property setting is greater than 0.  See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default	&H80000014& (Windows System Button Highlight Color) for LineHighlightColor, &H80000010& (Windows System Button Shadow Color) for LineShadowColor

Data Type	Color

Applies To	fpComboBox, fpListBox Controls.

See Also	LineStyleH, LineStyleV Properties.

Example	Refer to the LineStyleH, LineStyleV properties example.


LineStyleH
LineStyleH, LineStyleV

Description  Sets the 3-D style of the horizontal and vertical lines, respectively, in fpComboBox and fpListBox controls.

Usage 	[form.]control.LineStyleH[ = setting%]

[form.]control.LineStyleV[ = setting%]

Remarks 	The following settings are available:

Setting	Description
0	None (No lines drawn).
1	Solid.
2	3-D Lowered.
3	3-D Raised.
Use the LineHighlightColor and LineShadowColor properties to set highlighting and shadow colors for the 3-D settings.  See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default 	0 for both

Data Type 	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.

See Also  	LineHighlightColor, LineShadowColor, LineWidth Properties.

Example	This example sets a single column listbox with 3-D look for both the list portion and the selections and does an ascending sort on the data in the column.

Sub Form_Load ()

'Create a 3D look for the ListBox

fplistbox1.BackColor = G_LIGHT_GRAY

fplistbox1.LineStyleH = 1

fplistbox1.LineStyleV = 2

fplistbox1.LineHighlightColor = G_WHITE

fplistbox1.LineShadowColor = G_DARK_GRAY

fplistbox1.LineWidth = 1

'Create a 3D look for the selections (allow up to 5 selections)

fplistbox1.Sel3DStyle = 2

fplistbox1.SelDrawFocusRect = False

fplistbox1.SelMax = 5

'Do an ascending sort on the column

fplistbox1.Sorted = 1

End Sub


LineWidth

Description  Sets or retrieves the width of the solid, shadow, and highlight lines in fpComboBox and fpListBox control in pixels.

Usage 	[form.]control.LineWidth[ =value%]

Remarks 	Shadow and highlight lines display only when both the LineStyleH and LineStyleV property settings are greater than 0, despite the setting of the LineWidth property.

Default 	1

Data Type 	Integer

Applies To 	fpComboBox, fpListBox Controls.

See Also 	LineStyleH, LineStyleV Properties.

Example	Refer to the LineStyleH, LineStyleV properties example.


List

Description  Retrieves text from the selected row of the list portion in fpComboBox and fpListBox controls.

Usage	[form.]control.List

Remarks	Use the List property to access list items when the Columns property is 0.  You must specify a row with the Row property before you set the List property.  The List property is read only.

Note:  The List property is used with single column comboboxes and listboxes.  Use the ColList property with multiple column comboboxes and listboxes.

Data Type	String

Applies To	fpComboBox, fpListBox Controls.

See Also	Row Property.


List3DText

Description  Sets or retrieves the 3-D appearance of the text in the list portion of fpComboBox and fpListBox controls.

Usage 	[form.]control.List3DText[ = setting%]

Remarks 	The List3DText property allows the user to set a 3-D appearance for the text in the list portion of the control.  See the section Setting 3-D Text in Chapter 2 for more details.

Setting	Description
0	None: No 3-D appearance is used.
1	Etched.
2	Embossed.
3	Etched w/shading.
4	Embossed w/shading.
Default 	0 (None)

Data Type 	Integer (Enumerated)

Applies To  	fpComboBox and fpListBox Controls.

See Also 	List3DTextShadowColor, List3DTextOffset Properties.


List3DTextHighlightColor
List3DTextHighlightColor, List3DTextShadowColor

Description  Set the highlight and shadow colors for the text in the list portion of fpComboBox and fpListBox controls.

Usage 	[form.]control.List3DTextHighlightColor[ = color]

[form.]control.List3DTextShadowColor[ = color]

Remarks 	The List3DTextHighlightColor and List3DTextShadowColor properties are used to create a 3-D effect when the List3DText property setting is greater than 0.  The List3DTextHighlightColor property is usually set to a light shade while the List3DTextShadowColor property is set to a dark shade to achieve the 3-D effect.  See the section Setting 3-D Text in Chapter 2 for more details.

Default 	&H80000014& (Windows System Button Highlight Color) for List3DTextHighlightColor, &H80000010& (Windows System Button Shadow Color) for List3DTextShadowColor

Data Type 	Color

Applies To 	fpComboBox and fpListBox Controls.

See Also  	List3DText, List3DTextOffset Properties.


List3DTextOffset

Description  Sets the number of pixels that the 3-D shadow is offset behind the text in the list portion in fpComboBox and fpListBox controls.

Usage 	[form.]control.List3DTextOffset[ = value%]

Remarks 	The List3DTextOffset property sets the width for the shadow and highlight to make the text appear more raised or lowered as needed.  As a general rule, the larger the font size, the larger the offset should be.  See the section Setting 3-D Text in Chapter 2 for more details.

Default	1 pixel

Data Type 	Integer

Applies To  	fpComboBox and fpListBox Controls.

See Also  	List3DText, List3DTextHighlightColor, List3DTextShadowColor Properties.


ListCount

Description  Sets or returns the number of rows of data in the listbox portion of fpComboBox and fpListBox controls.

Usage	[form.]control.ListCount[ = value&]

Remarks	For more information refer to the ListCount property in Visual Basics Language Reference.

Data Type	Long

Applies To	fpComboBox, fpListBox Control.

See Also	ListIndex Properties.


ListIndex

Description  Returns the index of the array of currently selected rows in fpComboBox and fpListBox controls.

Usage	[form.]control.ListIndex[ = value%]

Remarks	The ListIndex property returns a -1 when there is no data in the control or when the user has entered text.  For more information refer to the ListIndex property in Visual Basics Language Reference.

Data Type	Integer

Applies To	fpComboBox, fpListBox Controls.

See Also	ListCount Property.


LineIndex

Description  Sets the index used to retrieve a line of text via the Text property when the TextMode property is set to 3 (Line).

Usage	[form.]control.LineIndex[ = value&]

Remarks	The TextMode property controls the way data is retrieved from or written via the Text property.  When the TextMode = 3, the text is retrieved line by line and displayed in the Text property.  The line retrieved each time is determined by setting the LineIndex property.  For example, if the LineIndex property is set to 4, the fourth line of text in the control is retrieved and read in the Text property.  The LineIndex property is available at run time only.

Data Type	Long

Applies To	fpMemo Control.

See Also	Text, TextMode Properties.

Example	Refer to LineCount property example.


LineLimit

Description  Sets or returns the maximum number of lines of text allowed in an fpMemo control.

Usage	[form.]control.LineLimit[ = value&]

Remarks	Use the LineLimit property to set the maximum number of lines of text permitted in an fpMemo control.

Note:  Any edit that fails due to the PageWidth or LineLimit property constraints automatically resets the Undo Buffer.

Note:  Retrieve the actual number of lines in an fpMemo control with the LineCount property.

Data Type	Long

Applies To	fpMemo Control.

See Also	LineCount, PageWidth Properties.


MarginBottom
MarginBottom, MarginLeft, MarginRight, MarginTop

Description  Sets or retrieves the margins of the text in pixels in the client area of the control.

Usage 	[form.]control.MarginBottom[ = value%]

[form.]control.MarginLeft[ = value%]

[form.]control.MarginRight[ = value%]

[form.]control.MarginTop[ = value%]

Remarks 	The value of a margin property must be between 0 and 15 pixels.  The value represents the number of pixels between the edge of the client area and the text.  You can use the margin properties for fine adjustments to the alignment of text in a control.

Note: The align properties (AlignPictureH, AlignPictureV, AlignTextH, and AlignTextV, OnFocusAlignH, OnFocusAlignV) are set in reference to the margin properties settings.

Default	3 pixels for all margin properties.

Note: This default is the Microsoft Visual Basic edit controls standard.  Other Microsoft controls have used 2,1,1,2 as defaults, respectively.

Data Type 	Integer

Applies To 	Formatted Edit Controls.

See Also 	AlignPictureH, AlignPictureV, AlignTextH, AlignTextV, OnFocusAlignH, OnFocusAlignV Properties.


Mask

Description  Determines the input mask for the fpMask control.

Usage	[form.]control.Mask[ = text$]

Remarks 	The standard mask characters are case sensitive; and must be set exactly as they are listed in order to define the mask.  If the U or L mask characters are used in the input mask, any alphabetic character keyed in for the U or L place, whether it is upper or lowercase, is allowed into the control but is automatically forced to the correct case as defined by the mask character.

Once a mask is filled with invalid data and an InvalidData event occurs, the control defaults to the UserEntry setting of 1 (FreeFormat), allowing unrestricted data entry in the control.

You can define the input mask at design time or at run time.  The following standard mask characters are available:

Character	Definition
#	Numeric only.
&	Any character.
?	Alpha only.
A	Alpha-numeric.
U	Uppercase alpha.
L	Lowercase alpha.
H	Hexidecimal (0-9, A-F).
\	Denotes the next character in the input mask as a hard coded character, rather than a symbol defining a mask character.  This allows the mask characters to represent their regular keyboard character in the mask.
Note: These mask characters are predefined.  User-defined mask characters are also available.  See the MaskChar property for details.

Default 	Empty String

Data Type 	String

Applies To 	fpMask Control.

See Also 	CharValidationText, ClipMode, MaskChar, PromptChar, PromptInclude, Text, UnFmtText Properties.


MaskChar

Description  Allows the application to define up to 10 sets of user defined mask characters.

Usage	[form.]control.MaskChar(Index%)[ = text$]

Remarks 	User defined mask characters may only be assigned at run time.  The standard mask characters may also be used in addition to any user-defined characters.

The MaskChar string may also designate characters which are not permitted into the data field of the control.  By setting the first character in the string to a tilda (~), the next characters in the string represent the character(s) not permitted entry into the control.  For example, if a program requested serial numbers, the MaskChar string could be set as "~IO01", preventing the characters I, O, 0, and 1 from use as part of a valid serial number.

Data Type	String

Applies To 	fpMask Control.

See Also  	Mask Property.

Example	Refer to Mask property example.


MaxDrop

Description  Sets or retrieves the number of rows to display when the listbox portion of an fpComboBox is displayed.

Usage	[form.]control.MaxDrop [ = value%]

Remarks 	The MaxDrop property does not apply when the Style property is set to 0 (Simple Combo).  The MaxDrop property is read only at run time.

Default 	8

Data Type 	Integer

Applies To 	fpComboBox Control.

See Also	Style Property.


MaxLength

Description  Sets or retrieves the maximum number of characters the user may enter in an fpText control.

Usage	[form.]control.MaxLength[ = value&]

Remarks 	When a user attempts to insert a character that would cause the length of text in the control to exceed the length set by the MaxLength property, a UserError event occurs.  The maximum number of allowable characters in the text control is 255 characters.  Data sets exceeding 255 characters are truncated.

Default 	255

Data Type 	Long

Applies To 	fpText Control.

See Also	UserError Event.

Example	This example creates a password box, defining the length of a password and assigning a character to display when the proper password character is entered.  Input is forced to lowercase to ensure consistency.

Sub Form_Load ()

fpText1.Text = ""	'Set text to empty string

fpText1.MaxLength = 8	'Maximum length of Password field

fpText1.AutoCase = 2 	'Set lowercase character entry

fpText1.PasswordChar = "*"	'Set password character to '*'

End Sub


MaxValue
MaxValue, MinValue

Description  Sets or retrieves the allowable maximum or minimum value of user entered data.

Usage	[form.]control.MaxValue[ = text$]

[form.]control.MinValue[ = text$]

Remarks 	Use the MaxValue and MinValue properties to restrict a numeric value to a specific range in a numeric control.  When the user selects a number below the minimum value or above the maximum value, a UserError event occurs.

When the UserEntry property is set to 0 (Formatted), a value less than the value set by the MinValue property when the MinValue is greater than 0 cannot be validated until the control loses focus.  At this time, if the MinValue is greater than the value entered in the control, the InvalidData event occurs and the UserEntry property switches to 1 (FreeFormat).  The same is true when the MaxValue is less than 0.

When a numeric value is not valid due to being out of range, the UserEntry property does not switch to 1 (FreeFormat).  As long as the data represents a numeric value, the UserEntry setting remains 0 (Formatted).

Default 	MaxValue: 9,999,999,999.99999 for fpCurrency and fpDoubleSingle, 214748364 for fpLongInteger.

MinValue: -9,999,999,999.99999 for fpCurrency and fpDoubleSingle, -214748364 for fpLongInteger.

Data Type 	String

Applies To 	fpCurrency, fpDoubleSingle, fpLongInteger Controls.

See Also	UserEntry Property., UserError Event.

Example	This example establishes the parameters for an fpCurrency control.  The MinValue and MaxValue properties restrict entries to fall between -5000 and 5000.

Sub Form_Load ()

'Set decimal precision, decimal point, currency sign, separator, 'symbol, min and max values

fpDouble1.CurrencyDecimalPlaces = 4

fpDouble1.FixedPoint = True

fpDouble1.MaxValue= "5000"

fpDouble1.MinValue = "-5000"

fpDouble1.UseSeparator = True

fpDouble1.NegToggle = False	'Minus key does not toggle value

fpDouble1.LeadZero = 2	'Lead zero for values >-1 and <1

End Sub


MonthHeaderStyle
MonthHeaderStyle, YearHeaderStyle

Description  Sets or retrieves the style of the month and year headings in the month header of the fpCalendar control, respectively.

Usage	[form.]control.MonthHeaderStyle[ = setting%]

[form.]control.YearHeaderStyle[ = setting%]

Remarks 	The MonthHeaderStyle and YearHeaderStyle properties determine how the months and years are displayed and accessed in the header line(s) at the top of the calendar.  The following settings are available:

Setting	Description
0	None: No header displayed for the month or year, respectively.
1	Scroll: Months or years may be scrolled by the user.  The left spin button selects the previous month or year.  The right spin button selects the following month or year, respectively.
2	DropDown: A DropDown button appears beside the month or year header.  Clicking the drop down button displays a menu of months or years from which the user may choose.
Note:  While the MonthHeaderStyle and YearHeaderStyle properties allow the user to scroll through or dropdown month and year options in the header, it is important to note that when the HeaderStyle property is set to 0 (None), it overrides the settings of the MonthHeaderStyle and YearHeaderStyle properties.  You must set the HeaderStyle property to a setting greater than 0 in order to access the scroll and dropdown buttons provided by the MonthHeaderStyle and YearHeaderStyle properties.

Default 	1 (Scroll) for both

Data Type	Integer (Enumerated)

Applies To	fpCalendar

See Also 	HeaderStyle, WeekDayHdr, YearHeaderStyle Properties.


MousePointer

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.MousePointer[ = setting]

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


MultiLine

Description  Specifies whether a control can accept and display multiple lines of text.

Usage	[form.]control.MultiLine[ = boolean%]

Remarks 	When the MultiLine property is set to True, multiple lines of text are allowed.  Text which exceeds the right border of the control is word wrapped to the next line.  When the MultiLine property is set to False, data is restricted to a single line and carriage returns are ignored.

Default	False

Data Type	Integer (Boolean)

Applies To	fpBoolean, fpText Controls.

See Also	ScrollBars (fpMemo) Property.

Example	This example initializes an array of 10 identical text boxes.

Sub Form_Load ()

Dim i As Integer

For i = 0 To 9

fpText1(i).MultiLine = True	'Allow multiple lines of text

fpText1(i).AutoAdvance = True	'Set keys to auto advance

fpText1(i).BorderStyle = 1	'Single line border

fpText1(i).OnFocusInvert3D = True	'Invert 3D when in focus

fpText1(i).ThreeDOutsideStyle = 1	'Set etched 3D style

fpText1(i).ThreeDOutsideWidth = 2	'Set outside border 3D width

fpText1(i).Text = ""	'Set empty text string

Next i

End Sub


MultiSelect

Description  Specifies whether a user can make multiple item selections in an fpListBox control and how the selections can be made.

Usage	[form.]control.MultiSelect[ = setting%]

Remarks 	The following MultiSelect property settings are available:

Setting	Description
0	Single Only:  Multiple selection is not allowed.
1	Simple multiple selection:  A mouse click or the Spacebar selects or deselects an item in the list.  (The <Arrow> keys move the pre-select focus).
2	Extended multiple selection:  <Shift> key + mouse click or <Shift> key + <Arrow> key extends the previously selected item to the current item.  <Ctrl> key + mouse click selects or deselects an item in the list.
For more information on using this property, refer to the MultiSelect property in Visual Basics Language Reference.

Default	0 (Single Only)

Data Type	Integer (Enumerated)

Applies To	fpListBox Control.


Name

Description  Refer to Visual Basic's Language Reference.

Data Type 	String

Applies To	All Aware/VBX Controls.


NegFormat

Description  Sets or retrieves the negative format for fpDoubleSingle and fpLongInteger controls.

Usage	[form.]control.NegFormat[ = setting%]

Remarks	The NegFormat property sets the display of negative values in the fpDoubleSingle and fpLongInteger controls.  The following settings are available:

Setting	Description
0	(1)
1	-1
2	1-
Note:  There are no International Settings for noncurrency negative formats.

Default	1, displays negative values as -1

Data Type	Integer (Enumerated)

Applies To	fpDoubleSingle, fpLongInteger Controls.

See Also	CurrencyNegFormat, NegToggle Properties.

Example	This example sets an fpDoubleSingle control to accept and display specified values.  Using the NegFormat property,  the negative sign is set to display to the left of the value.

Sub Form_Load ()

'Set variables for double control

fpDoubleMinMax.NegFormat = 1	'-1

fpDoubleMinMax.MaxValue = "5000"

fpDoubleMinMax.MinValue = "-5000"

fpDoubleMinMax.UseSeparator = True

fpDoubleMinMax.Separator = "/"

fpDoubleMinMax.FixedPoint = True	'Display 4 decimal places

fpDoubleMinMax.DecimalPlaces = 4

fpDoubleMinMax.DecimalPoint = "#"

fpDoubleMinMax.NegToggle = False

End Sub


NegToggle

Description  Allows toggling between a negative and a positive value in a numeric control.

Usage	[form.]control.NegToggle[ = boolean%]

Remarks	When the NegToggle property is set to True, the negative key (the <Minus> key) on the keyboard may be pressed to toggle the value of a number from positive to negative in numeric controls.  The caret may be at any place in the number to toggle the value.

Default	False

Data Type	Integer (Boolean)

Applies To	fpCurrency, fpDoubleSingle, fpLongInteger Controls.

See Also	AutoToggle Property.

Example	This example establishes the parameters for an fpCurrency control.  NegToggle is disabled, preventing the user from using the -  to switch between a negative and positive value.

Sub Form_Load ()

'Set decimal precision, decimal point, currency sign, separator, 'symbol, min and max values

fpDouble1.CurrencyDecimalPlaces = 4

fpDouble1.FixedPoint = True

fpDouble1.MaxValue= "5000"

fpDouble1.MinValue = "-5000"

fpDouble1.UseSeparator = True

fpDouble1.NegToggle = False	'Minus key does not toggle value

fpDouble1.LeadZero = 2	'Lead zero for values >-1 and <1

End Sub


NoSpecialKeys

Description  Enables/Disables the standard control character key actions during editing.

Usage 	[form.]control.NoSpecialKeys[ = setting%]

Remarks 	Use the NoSpecialKeys property to assign editing functionality to certain keys on the keyboard.  The following settings are available:

Setting	Description
0	All special keys are enabled.
1	Aware/VBX keys are disabled.
2	Standard edit shortcuts are disabled.
3	All special keys are disabled.
Special keys are composed of the standard edit keys and the Aware/VBX keys.  These keys or combinations of keys function as follows:

Standard Edit Shortcut Keys	Function
<Ctrl+Z>	Undo: Removes the last edit.
<Ctrl+C>	Copy:  Copies text to the clipboard.
<Ctrl+X>	Cut:  Cuts text to the clipboard.
<Ctrl+V>	Paste:  Pastes text from the clipboard.
Aware/VBX Keys	Function
<Ctrl+N>	Set Null.
<F2>	Clears the contents of the control..  Or, if the AllowNull property is set to True, set the control to Null.
<F3>	Set the contents of an fpDateTime control to the current date and time default value.
<F4>	User select, displays a popup calendar allowing the user to select the date value for the control.  This function key is currently only available in the fpDateTime control.
Note:  The <Ctrl+Insert>, <Shift+Insert>, and <Shift+Delete> shortcuts are not affected by the NoSpecialKeys property.

Default 	0

Data Type 	Integer (Boolean)

Applies To 	Formatted Edit Controls.

See Also 	Action, ClipMode Properties.


NullColor

Description  Sets a Null background color for a control.

Usage	[form.]control.NullColor[ = color]

Remarks 	The NullColor property visually cues the user that the data in the control is a null value.  The background color of the control changes to the NullColor when the data in the control is Null and the control loses focus.  The AllowNull property must be set to True in order for the NullColor property and other null properties to function.

Data Type 	Color

Default 	&H8000000B& (default to BackColor)

Applies To 	Formatted Edit Controls.

See Also 	AllowNull, IsNull Properties.

Example	This example allows the end user to input null values into a text control.  When a null value has been entered, the color of the control will change to that set by the NullColor property.

Sub Form_Load ()

'Assign Null properties and color to text control

fpText1.AllowNull = True

fpText1.NullColor = RGB(128, 0, 0)

fpText1.Action = 5	'Null

End Sub


OnFocusAlignH
OnFocusAlignH, OnFocusAlignV

Description  Sets or retrieves the alignment of the data in a formatted edit control which has focus.

Usage	[form.]control.OnFocusAlignH[ = setting%]

[form.]control.OnFocusAlignV[ = setting%]

Remarks 	You can customize the alignment of text within a control when it is in focus with the OnFocusAlign properties.  You can edit text from a standard setting in the control which has the focus, but set a different text alignment for controls which are not currently in focus.

Note:  The Enabled property must be True and the ControlType property cannot be set to 2 (Static) in order for the OnFocus properties to function.

The alignment is always set with reference to the margins specified for the control.  These margins must be specified with the margin properties before aligning the text.  OnFocusAlignH sets the horizontal location of the text to left, center, or right.  OnFocusAlignV sets the vertical alignment of the text to top, center, or bottom.

When the margins set to the left and right or to the top and bottom of the control are unequal, the center alignment setting of the OnFocusAlignH and OnFocusAlignV properties centers the bitmap with respect to the margins, but the bitmap is not centered with respect to the border of the control.  For example, if the right margin is set to 5 pixels and the left margin is set to 10 pixels, setting the OnFocusAlignH property to 1, or center, centers the text between the margins, and the text is not centered in the middle of the control.

Note:  The OnFocusAlignH and OnFocusAlignV properties are available with the formatted edit controls only.

The following settings are available:

Setting	Description
OnFocusAlignH
0	Default:  Defaults to the setting of the AlignTextH property.
1	Left:  Aligns text against the left margin of the control.
2	Center:  Centers text between the left and right margins of the control.
3	Right:  Aligns text against the right margin of the control.
OnFocusAlignV
0	Default:  Defaults to the setting of the AlignTextV property.
1	Top:  Aligns text against the top margin of the control.
2	Center:  Centers text between the top and bottom margins of the control.
3	Bottom:  Aligns text against the bottom margin of the control.
Default 	0 for both, default to the settings of the AlignTextH and AlignTextV properties, repectively.

Data Type 	Integer (Enumerated)

Apply To 	Formatted Edit Controls.

See Also 	AlignTextH, AlignTextV Properties.

Example	This example sets OnFocus properties in an fpText control.

Sub Form_Load ()

fpText1.OnFocusAlignH = 2	'Align text horizontally

fpText1.OnFocusAlignV = 1	'Align onfocus text vertically

fpText1.OnFocusNoSelect = False	'Select all when on focus

fpText1.OnFocusPosition = 0	'Set caret to end of field

fpText1.HideSelection = True	'Hide out of focus selection

End Sub


OnFocusInvert3D

Description  Determines whether to invert the 3-D appearance of a control when it is in focus.

Usage	[form.]control.OnFocusInvert3D[ = boolean%]

Remarks 	The OnFocusInvert3D property can only be used when the ThreeDInsideStyle or ThreeDOutsideStyle properties are greater than zero.  When the OnFocusInvert3D property is set to True, the 3-D appearance of the on focus control is inverted with respect to its normal 3-D appearance.  When the OnFocusInvert3D property is set to False (the default value), the control maintains its normal 3-D appearance when it is in focus.

Note:  The Enabled property must be set to True in order for the OnFocus properties to function.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls except fpComboBox and fpListBox.

See Also 	ThreeDInsideStyle, ThreeDOutsideStyle Properties.

Example	This example initializes an array of 10 identical text boxes.  The 3D effect of the control in the array inverts when the control receives focus.

Sub Form_Load ()

Dim i As Integer

For i = 0 To 9

fpText1(i).AutoAdvance = True	'Set keys to auto advance

fpText1(i).BorderStyle = 1	'Single line border

fpText1(i).OnFocusInvert3D = True	'Invert 3D when in focus

fpText1(i).ThreeDOutsideStyle = 1	'Set etched 3D style

fpText1(i).ThreeDOutsideWidth = 2	'Set outside border 3D width

fpText1(i).Text = ""	'Text is empty string

Next i

End Sub


OnFocusNoSelect

Description  Determines how text is selected when a control gets focus.

Usage	[form.]control.OnFocusNoSelect[ = boolean%]

Remarks 	When the OnFocusNoSelect property is set to False (the default value), the contents of the control are selected for editing when the control gets focus.  The first key stroke clears the contents of the control, allowing for quick editing.

When the OnFocusNoSelect property is set to True, the contents of the control are not selected when the control gets focus.

Note:  The Enabled property must be set to True in order for the OnFocus properties to function.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	Formatted Edit Controls.

See Also	HideSelection Property.

Example	This example sets an fpMemo control to display a double line caret in Insert mode, and a block caret in Overwrite mode, giving the user the look and feel of a word processing program.  The OnFocusNoSelect property does not highlight the entire control when it first receives focus.  The block cursor works best with a fixed size font.

Sub Form_Load ()

fpMemo1.CaretInsert = 1	'Double insert caret

fpMemo1.CaretOverWrite = 2	'Block overwrite caret

fpMemo1.FontName = "Courier New"	'Set font to Courier New

fpMemo1.FontSize = "10"	'Set font size to 10 point

fpMemo1.OnFocusNoSelect = True	'No selection when on focus

End Sub


OnFocusPosition

Description  Sets or retrieves the setting used to control the caret positioning when the control gets focus.

Usage	[form.]control.OnFocusPosition[ = setting%]

Remarks 	The OnFocusPosition property controls the position of the caret.  You can set the caret to return to a consistent position when the control receives focus.  The following settings are available:

Setting	Description
0	End:  Sets caret to end of data entry field.
1	Beginning:  Sets caret to beginning of data entry field.
2	Previous:  Sets caret to position it held when control was last in focus.
3	Caret:  Sets caret to current position of I-bar (mouse use only).
Note:  The Enabled property must be set to True in order for the OnFocus properties to function.

Default	0 (End)

Data Type 	Integer (Enumerated)

Applies To  	Formatted Edit Controls.

See Also	CurrentPosition Property.

Example	Refer to OnFocusAlignH, OnFocusAlignV property example.


OnFocusShadow

Description  Determines whether a drop shadow is drawn for a control when the control is in focus.

Usage	[form.]control.OnFocusShadow[ = boolean%]

Remarks 	When the OnFocusShadow property is set to True, a drop shadow is drawn outside of the border to the right and bottom of the control currently in focus.  Set the color and width of this shadow with the DropShadowColor and DropShadowWidth properties, respectively.

Note:  The DropShadowWidth selected affects the size of the client area of the control.  Make sure you set the DropShadowWidth property before you set the properties within the client area of the control to avoid sizing errors.

The drop shadow color defaults to the BackColor of the form when the control is not in focus.  To make the drop shadow a different color than the BackColor of the form when the control is not in focus, you can set this color with the BorderGrayAreaColor property.

Note:  The Enabled property must be set to True in order for the OnFocus properties to function.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls except fpComboBox and fpListBox.

See Also 	DropShadowColor, DropShadowWidth Properties.

Example	This example sets an fpText control with a custom drop shadow when in focus.

Sub Form_Load ()

fpTextPhoneNumber.OnFocusShadow = True

fpTextPhoneNumber.DropShadowColor = RGB(128, 128, 128)

fpTextPhoneNumber.DropShadowWidth = 3

End Sub


PageWidth

Description  Sets or returns the maximum line width or boundary for word wrapping in an fpMemo control.

Usage	[form.]control.PageWidth[ = value!]

Remarks	Set the WordWrap property to True before setting the PageWidth property.  The Units used for the PageWidth property are determined by the ScaleMode for the form.  When the PageWidth property is set to 0, the maximum line width defaults to the width of the control.

Note:  Any edit that fails due to the PageWidth constraint automatically resets the Undo Buffer.

Data Type	Single

Applies To	fpMemo Control.

See Also	LineLimit, WordWrap Properties.


Parent

Description  Refer to Visual Basic's Language Reference.

Usage	[form.]control.Parent

Data Type	Form

Applies To 	All Aware/VBX Controls.


PasswordChar

Description  Determines whether the characters typed by a user or placeholder characters are displayed in an fpText control; determines the character used as a placeholder.

Usage	[form.]control.PasswordChar[ = text$]

Remarks	Use this property to create a password field within a form.  This property does not affect the Text property; it contains exactly what the user types or what was set in code.  Set the PasswordChar property to the empty string or to Chr$(0) to display the actual text.

Any string may be assigned to this property, but only the first character is significant; all others are ignored.

Default 	Empty String

Data Type 	String

Applies To 	fpText control

Example	This example creates a password box, defining the length of a password and assigning a character to display when the proper password character is entered.  Input is forced to lowercase to ensure consistency.

Sub Form_Load ()

fpText1.Text = ""	'Set text to empty string

fpText1.MaxLength = 8	'Maximum length of Password field

fpText1.AutoCase = 2 	'Lowercase character entry only

fpText1.PasswordChar = "*"	'Set password character to '*'

End Sub


Picture

Description  Sets the type of graphic to be used in the fpBinary control.

Usage	[form.]control.Picture[ = picture]

Remarks	The fpBinary control supports bitmaps and icons.  Icons set by the Picture property and saved to a database are saved as bitmaps and are returned as bitmaps in future Usage.  Currently, metafiles are not supported in the fpBinary control.

Data Type	Picture

Applies To	fpBinary Control.

See Also	BinaryStyle Property.

Example	This example loads a picture into the binary control that can be scrolled through.

Sub Form_Load ()

fpBinary1.Picture = LoadPicture("c:\vb\icons\office\clip02.ico")

fpBinary1.BinaryStyle = 1 'Left

fpBinary1.ScrollBars = True

End Sub


PictureFalse
PictureFalse, PictureFalseDisabled, PictureFalseDown, PictureTrue, PictureTrueDisabled, PictureTrueDown

Description  Set the graphic displayed for each state of an fpBoolean control.

Usage	[form.]control.PictureFalse[ = picture]

[form.]control.PictureFalseDisabled[ = picture]

[form.]control.PictureFalseDown[ = picture]

[form.]control.PictureTrue[ = picture]

[form.]control.PictureTrueDisabled[ = picture]

[form.]control.PictureTrueDown[ = picture]

Remarks	The bitmap set with the PictureFalse property is used as the default for all other picture properties.  The PictureFalseDisabled property is used when the Enabled property is False and the state is False.  The PictureTrueDisabled property is used when the Enabled property is False and the state is True.  The PictureFalseDown and PictureTrueDown properties are used when the mouse button is held down.

Data Type	Picture

Applies To	fpBoolean Control.

See Also	BooleanMode, BooleanStyle, TextDisabled, TextFalse, TextTrue Properties.

Example	This example sets an fpBoolean control to display pictures representing the different states of the control.

Sub Form_Load ( )

'Create a button that contains graphics(right of text) and text

fpBoolean1.BooleanMode = 1	'Set three state control

fpBoolean1.BooleanStyle = 2	'Allow bitmap only in control

fpBoolean1.BooleanPicture = 4	'Set a user defined picture

fpBoolean1.PictureTrueDown = LoadPicture("c:\vb\icons\office\clip01.ico")

fpBoolean1.PictureTrue = LoadPicture("c:\vb\icons\office\clip02.ico")

fpBoolean1.PictureTrueDisabled = LoadPicture("c:\vb\icons\office\clip03.ico")

fpBoolean1.PictureFalseDown = LoadPicture("c:\vb\icons\office\clip04.ico")

fpBoolean1.PictureFalse = LoadPicture("c:\vb\icons\office\clip05.ico")

fpBoolean1.PictureFalseDisabled = LoadPicture("c:\vb\icons\office\clip06.ico")

fpBoolean1.AlignPictureH = 4	'Right align picture

fpBoolean1.AlignPictureV = 1	'Center picture vertically

End Sub


PromptChar

Description  Specifies the character to be used as the prompt character for unfilled positions in an fpMask control.

Usage	[form.]control.PromptChar[ = text$]

Remarks 	The prompt character is a placeholder that visually cues the user that more data is required in the field.  Each time the mask receives focus, all unfilled positions are replaced by the selected prompt character as set by the PromptChar property.  In order for an fpMask control to accept a prompt character in the result string, the PromptInclude property must be set to True.

Default 	_ (Underscore character)

Data Type 	String

Applies To 	fpMask Control.

See Also 	Mask, PromptInclude Properties.

Example	This example prompts the user for input with the _ character until the mask is completely filled.

Sub Form_Load ()

fpMaskBasic1.Text = ""	'Text is empty string

fpMaskBasic1.Mask = "#####-#####"	'Set numbers only mask

fpMaskBasic1.PromptChar = "_"	'Set prompt character

fpMaskBasic1.PromptInclude = True	'Use prompt character

End Sub


PromptInclude

Description  Determines whether the prompt character is included in the result string of an fpMask control.

Usage	[form.]control.PromptInclude[ = boolean%]

Remarks 	When the PromptInclude property is set to True, the prompt character is included in the string returned by the Text property.  When the PromptInclude property is set to False (the default value), only the characters up to the last character in the mask are included in the string returned by the Text property.  Any formatting characters beyond the last character will not be included.  You can use the PromptInclude property to check for unfilled positions in the mask after data is returned.

Note:  Use the PromptChar property to change the value of the prompt character.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpMask Control.

See Also 	Mask, PromptChar Properties.

Example	Refer to the PromptChar property example.


Redraw

Description  Allows or prevents immediate repainting of the control.

Usage	[form.]control.Redraw [ = boolean%]

Remarks 	Use the Redraw property when you set properties or events which cause the control to repaint.

When the Redraw property is set to True (the default value), the control is automatically refreshed each time a property is set that changes the controls appearance or data.  When the Redraw property is set to False, the screen is not updated each time a change is made to the control.

Set Redraw to False when adding large amounts of data or when making multiple changes to a controls appearance, then set the Redraw property to True when finished.  All items in the control that have changed since the Redraw property was set to False are refreshed at once, eliminating unnecessary repainting.

Default 	True

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls except fpComboBox and fpListBox.

Example	This example allows an end user to click a button to re-align text and increase margins with the AlignText and margin properties, respectively.  The Redraw property prevents flickering when the control changes.

Sub Form_Load

'Assign text to both controls

fpText1.Text = "Click 'Change' to re-align the text"

fpText2.Text = "in the controls"

End Sub

Sub Reposition_Click ()

'Turn redraw off to prevent flickering while setting controls

fpText1.Redraw = False

fpText2.Redraw = False

'Make changes to both controls

fpText1.Text = "This text is"	'Set text for fpText1

fpText2.Text = "Re-Aligned"	'Set text for fpText2

fpText1.AlignTextH = 1 	'Center fpText1 text horizontally

fpText1.AlignTextV = 1 	'Center fpText1 text vertically

fpText2.MarginTop = 10	'Set top margin in fpText2

fpText2.MarginBottom = 10	'Set bottom margin in fpText2

fpText2.MarginLeft = 15	'Set left margin in fpText2

fpText2.MarginRight = 20	'Set right margin in fpText2

fpText1.Redraw = True	'Redraw fpText1

fpText2.Redraw = True	'Redraw fpText2

End Sub


RequireFill

Description  Determines whether the input mask must be entirely filled when an fpMask control loses focus.

Usage	[form.]control.RequireFill[ = boolean%]

Remarks 	When the RequireFill property is set to True, the mask must be entirely filled before the contents are considered valid.  An InvalidData event is fired if the mask is not filled.

When the RequireFill property is set to False (the default value), the control does not have to be filled in order to be considered valid: as long as the mask contains valid characters when the control loses focus an InvalidData event is not fired.

Note:  When the UserEntry property is Formatted, the RequireFill property is set to True, and the contents of the control are invalid due to unfilled positions in the mask, the control will not switch to Invalid Entry Mode.

Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpMask Control.

See Also 	AllowOverflow, InvalidOption, IsValid, PromptChar Properties., InvalidData Event.

Example	This example requires the mask be completely filled with requested data upon losing focus.

Sub Form_Load ()

fpMask1.Mask = "##-UU"	'Set mask

fpMask1.Text = "11-AB"	'Set mask text

fpMask1.RequireFill = True	'Require out of focus filled mask

End Sub


Row

Description  Sets or returns the desired row in fpComboBox and fpListBox controls.

Usage	[form.]control.Row[ = value&]

Remarks	The Row property must be set before retrieving data from the List or ColList properties.

Default	0

Data Type	Long

Applies To	fpComboBox, fpListBox Controls.

See Also	Col, ColList, List Properties.


ScrollBars (fpBinary)

Description  Determines whether an fpBinary control uses horizontal or vertical scroll bars.

Usage	[form.]control.ScrollBars [ = boolean%]

Remarks	Use the ScrollBars property when the bitmap is larger than the height or width of the control.  The following settings are available:

Setting	Description
False	The control has no scroll bars (the default value).
True	The control has a horizontal or vertical scroll bar, or both.
Default 	False

Data Type 	Integer (Boolean)

Applies To 	fpBinary Control.

See Also 	BinaryStyle Property.

Example	This example loads a picture into the binary control that can be scrolled through.

Sub Form_Load ()

fpBinary1.Picture = LoadPicture("c:\vb\icons\office\clip02.ico")

fpBinary1.BinaryStyle = 1 'Left

fpBinary1.ScrollBars = True

End Sub


ScrollBars (fpComboBox
ScrollBars (fpComboBox, fpListBox)

Description  Specifies whether fpComboBox or fpListBox controls use horizontal or vertical scroll bars.

Usage	[form.]control.ScrollBars [ = setting%]

Remarks	The following settings are available:

Setting	Description
0	None.
1	Horizontal.
2	Vertical.
3	Both.
The ScrollBars property is available at design time only.  For more information on this property, refer to the ScrollBars property in Visual Basics Language Reference.

Default 	2 (Vertical)

Data Type 	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.


ScrollBars (fpMemo)

Description  Specifies whether an fpMemo control has horizontal or vertical scrollbars.

Usage	[form.]control.ScrollBars [ = setting%]

Remarks	You can set scrollbars in an fpMemo control to be visible at all times (fixed) or to be visible only as needed (auto).  The following settings are available:

Setting	Description
0	None:  No ScrollBars are displayed in the control, even if the text extends beyond the borders of the control.
1	Horizontal (Auto):  Horizontal ScrollBar is visible when the setting of the PageWidth property exceeds the width of the control.
2	Vertical (Auto):  Vertical ScrollBar is visible when the number of lines of text exceed the height of the control.
3	Both (Auto): Horizontal and/or Vertical ScrollBars are visible as needed (See the circumstances in settings 1 and 2).
4	Horizontal (Fixed): Horizontal ScrollBar is always visible.
5	Vertical (Fixed): Vertical ScrollBar is always visible.
6	Both (Fixed): Both Horizontal and Vertical ScrollBars are always visible.
Note:  The fpText control does not support scrollbars because it is limited to less than 255 text characters.  Use the fpMemo control to support scrollbars for text with more than 255 characters.

Default 	0 (None)

Data Type 	Integer (Enumerated)

Applies To 	fpMemo Control.

See Also 	MultiLine Property.


Seconds

Description  Sets or returns the display of seconds in an fpClock control.

Usage	[form.]control.Seconds[ = boolean%]

Remarks	When the Seconds property is set to True, seconds are displayed on the clock.  When the Seconds property is set to False (the default value), no seconds appear on the clock.

Default	False

Data Type	Integer (Boolean)

Applies To	fpClock Control.

See Also	ClockStyle Property.


Sel3DHighlightColor
Sel3DHighlightColor, Sel3DShadowColor

Description  Set the selection 3-D highlight and 3-D shadow colors, respectively, in fpComboBox and fpListBox controls.

Usage	[form.]control.Sel3DHighlightColor[ = color]

[form.]control.Sel3DShadowColor[ = color]

Remarks	Use the Sel3DHighlightColor and Sel3DShadowColor properties to create a 3-D effect when the Sel3DStyle property setting is greater than 0.  See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default	&H80000014& (Windows System Button Highlight Color) for Sel3DHighlightColor, &H80000010& (Windows System Button Shadow Color) for Sel3DShadowColor

Data Type	Color

Applies To	fpComboBox, fpListBox Controls.

See Also	Sel3DStyle, Sel3DWidth Properties.


Sel3DStyle

Description  Sets or retrieves the 3-D style of the selection in fpComboBox and fpListBox controls.

Usage	[form.]control.Sel3DStyle[ = setting%]

Remarks 	The following settings are available:

Settings	Description
0	None: No 3-D appearance is used.
1	Lowered:  shadow color used to color the bottom and right border sides, highlight color used to color the top and left border sides.
2	Raised: shadow color used to color the top and left border sides, highlight color used to color the bottom and right border sides.
See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default	0 (None)

Data Type 	Integer (Enumerated)

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Sel3DHighlightColor, Sel3DShadowColor, Sel3DWidth Properties.

Example	Refer to the LineStyleH, LineStyleV properties example.


Sel3DWidth

Description  Sets or retrieves the width of the 3-D lines in fpComboBox and fpListBox controls.

Usage 	[form.]control.Sel3DWidth[ = value%]

Remarks 	Shadow and highlight lines display only when the Sel3DStyle property setting is greater than 0, despite the setting of the Sel3DWidth property.  See the section Setting a 3-D Appearance in Chapter 2 for more details.

Default 	0

Data Type 	Integer

Applies To 	fpComboBox, fpListBox Controls.

See Also 	Sel3DHighlightColor, Sel3DShadowColor, Sel3DStyle Properties.


SelBackColor
SelBackColor, SelForeColor

Description  Set the color used for the background and text of the selected rows in the control, respectively.

Usage	[form.]control.SelBackColor[ = color]

[form.]control.SelForeColor[ = color]

Remarks	Contrast the color set for the SelForeColor property with the color set for the SelBackColor property or the selected row or selected text will not be visible.

Default	&H8000000D& (Windows System Highlight Color) for SelBackColor, &H8000000E& (Windows System Highlighted Text Color) for SelForeColor.

Data Type	Color

Applies To	fpComboBox, fpListBox, fpMemo Controls.

See Also	BackColor, ForeColor Properties.


SelCount

Description  Returns the number of selected items in an fpListBox control.

Usage	[form.]control.SelCount[ = value&]

Remarks	The SelCount property returns the actual number of rows selected.  Use the SelMax property to set the maximum number of rows which may be selected.

Default	0

Data Type	Long

Applies To	fpListBox Control.

See Also	SelMax Property.


SelDrawFocusRect

Description  Determines whether to draw a focus rectangle around a selected entry in fpComboBox and fpListBox controls.

Usage	[form.]control.SelDrawFocusRect[ = boolean%]

Remarks	The focus rectangle may mar the aesthetics of 3-D drawing (Sel3DStyle property settings 2 (Lowered) or 3 (Raised)), so displaying it is optional.

Default	True

Data Type	Integer (Boolean)

Applies To	fpComboBox, fpListBox Controls.

See Also	Sel3DStyle Property.

Example	Refer to the LineStyleH, LineStyleV properties example.


Selected

Description  Determines the selection status of an item in an fpListBox control.

Usage	[form.]control.Selected[ = boolean%]

Remarks	You must set the Row property to a specific row before using the Selected property.  When the Selected property is True, the item(s) is/are selected.  When the Selected property is False (the default value), the item(s) is/are not selected.  The Selected property is not available at design time.

For more information, refer to the Selected property in Visual Basics Language Reference.  Note, however, that the Aware/VBX Selected property is not an array property whereas Visual Basics Selected property is an array property.

Default	False

Data Type	Integer (Boolean)

Applies To	fpListBox Control.

See Also	List, ListCount, ListIndex, MultiSelect, Row, TopIndex Properties.


SelLength

Description  Determines the number of characters selected in the control.

Usage 	[form.]SelLength[ = length&]

Remarks	Setting SelLength to less than 0 causes a run time error.  For more information, refer to the SelLength property in Visual Basic's Language Reference.

Data Type	Long

Applies To 	Formatted Edit, fpComboBox, fpListBox, fpMemo Controls.

See Also	SelStart, SelText Properties.


SelMax

Description  Sets the maximum number of rows that may be selected in an fpListBox control.

Usage	[form.]control.SelMax[ = value&]

Remarks	The SelMax property sets the maximum number of rows which may be selected.  When -1 is used, the end user may make any number of selections.

Note:  Use the SelCount property to return the actual number of rows selected.

Default	-1

Data Type	Long

Applies To	fpListBox Control.

See Also	SelCount Property.

Example	Refer to the LineStyleH, LineStyleV properties example.


SelMode

Description  Sets the mode for highlighting selected text.

Usage	[form.]control.SelMode[ = setting%]

Remarks	The following options are available:

Setting	Description
0	Normal: Selection highlighting extends only to the end of the text on each line.
1	Extended:  Selection highlighting extends to the right margin of the control when the end of the line is selected.
2	Line:  Only entire lines of text may be selected.
Default	0

Data Type	Integer (Enumerated)

Applies To	fpMemo Control.

See Also	SelBackColor, SelForeColor Properties.


SelStart

Description  Determines the starting point of selected data or indicates theinsertion point if no data is selected.

Usage 	[form.]SelStart[ = index&]

Remarks	For more information, refer to the SelStart property in Visual Basic's Language Reference.

Data Type	Long

Applies To 	Formatted Edit, fpComboBox, fpListBox, fpMemo Controls.

See Also	SelLength, SelText Properties.


SelText

Description  Returns the string containing the currently selected text.

Usage 	[form.]SelText

Remarks	When no selection has been made in the control, the SelText property returns the empty string unless the AllowNull property is set to True.  When AllowNull is True, the appropriate Null value is returned for the control.

The Aware/VBX SelText property is not available at design time and is read only at run time.  For more information on standard property behavior, refer to the SelText property in Visual Basic's Language Reference.

Data Type	String

Applies To 	Formatted Edit, fpComboBox, fpListBox, fpMemo Controls.

See Also	AllowNull, SelLength, SelStart Properties.


Separator

Description  Sets or retrieves the character used to separate hours, minutes and seconds in an fpClock control, or the character used to represent thousands in numbers with more than three digits in numeric controls.

Usage 	[form.]control.Separator[ = text$]

Remarks	The string set by the Separator property is limited to a single character.  Use the Visual Basic Chr$() function to prevent the character selected as the separator from being typed in using the keyboard.

When no separator string has been set with the Separator property, the control uses the International Setting for the separator character based on your Windows system configuration.  The International Setting separator character for the numeric controls differs from the separator used for the fpClock control.

Use the Separator property for the fpClock control when the ClockStyle setting is 0 (Default).

Note:  Using numeric values to represent the separator may produce unexpected results.

Default 	Empty String, returns the International Setting for the default separator character based on your Windows system configuration.

Data Type	String

Applies To 	fpClock, fpCurrency, fpDoubleSingle, fpLongInteger Controls.

Note:  There is no Separator property for the fpDateTime control because the separator can be specified with the UserDefinedFormat property.

See Also 	ClockStyle, UseSeparator Properties.

Example	This example sets the format used to display an fpLongInteger control.

Sub Form_Load ()

fpLongMinMax.NegFormat = 1	'-1

fpLongMinMax.Separator = ","

fpLongMinMax.UseSeparator = False

End Sub


ShowEOL

Description  Determines whether to display the paragraph character in an fpMemo control.

Usage	[form.]control.ShowEOL[ = boolean%]

Remarks	When the ShowEOL property is set to True (the default value), a paragraph character always appears at the end of a line of text to mark a carriage return.  The paragraph character used is the ASCII character ASC(B6) of the current font.  When the ShowEOL property is set to False, no paragraph character marks a carriage return.  Use the ShowEOL property when the WordWrap property is set to False to indicate that the end of the line contains a carriage return.

Default	True

Data Type	Integer (Boolean)

Applies To	fpMemo Control.

See Also	WordWrap Property.


Sorted

Description  Sets or returns the type of sort on the contents of a single column listbox or combobox.

Usage	[form.]control.Sorted[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	None.
1	Ascending.
2	Descending.
Note:  Changing this property at run time will destroy the contents of the combobox.

Default	0 (None)

Data Type	Integer (Enumerated)

Applies To	fpComboBox, fpListBox Controls.

See Also	ColSorted, ColSortSequence Properties.

Example	Refer to LineStyleH, LineStyleV properties example.


StartTime

Description  Sets or retrieves the start time in the fpClock control.

Usage	[form.]control.StartTime[ = text$]

Remarks  	You can set the StartTime property to ascertain the amount of time which has elapsed from that point forward.  The StartTime property is set to the current time when an fpClock control is created.  The format of the start time string is determined by the TimeScale property.

Default 	00:00:00

Data Type 	String

Applies To 	fpClock

See Also 	CurrentTime, ElapsedTime, TimeScale Properties.

Example	This example initializes three clocks:  Clock 1 displays the current time, clock 2 displays the time when the application began, and clock 3 displays the amount of time that has elapsed since the application began.

Sub Form_Load ()

fpClock2.AutoUpdate = False	'No auto update Clock2

fpClock3.ClockMode = 3	'Stopwatch

fpClock3.AutoUpdate = False	'No auto update Clock3

fpClock1.StartTime = fpClock1.CurrentTime	'Start time = current

fpClock2.CurrentTime = fpClock1.StartTime

End Sub

SubfpClock1_Change ()

fpClock3.CurrentTime = fpClock1.ElapsedTime	'Current time = elapsed

End Sub


Style

Description  Specifies the type of combobox used in an fpComboBox control.

Usage	[form.]control.Style[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	Dropdown Combo.
1	Simple Combo.
2	Dropdown ListBox.
For more information on the function of each style, refer to the Style property in Visual Basics Language Reference.

Note:  Changing this property at run time will destroy the contents of the combobox.

Default	0 (DropDown Combo)

Data Type	Integer (Enumerated)

Applies To	fpComboBox Control.

See Also	Change, Click, DblClick, DropDown Events


TabIndex

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.TabIndex[ = index]

Data Type 	Integer

Applies To 	All Aware/VBX Controls.


TabStop

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.TabStop[ = boolean%]

Note:  The TabStop property is set to False when the ControlType property is set to 2 (Static) and is returned to True when the ControlType property is changed from 2 (Static) to 0 (None) or 1 (ReadOnly).

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls.

See Also	ControlType property


Tag

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.Tag[ = expression]

Data Type 	String

Applies To 	All Aware/VBX Controls.


Text (Formatted Edit, fpBoolean)

Description  Sets or returns the contents of the control as a string matching exactly what is displayed.

Usage 	[form.]control.Text[ = text$]

Remarks 	Use the Text property to read the string contained in the edit area of the fpText control.  The retrieved text always matches the text displayed, and may include different formatting characters and symbols as designated by the individual control.  The Text property is not available at design time in the fpBoolean control.

Note:  When binding a control to a database, consider the format in which you want the data to be modified and returned.  The Text property reads and returns all characters in an edit field, including the formatting characters contained in the string.  The UnFmtText and Value properties read and return a string with raw data only; no formatting characters are returned.

Default	Empty String

Data Type 	String

Applies To 	Formatted Edit, fpMemo, fpBoolean Controls.

See Also 	UnFmtText, Value (Formatted Edit) Properties.


Text (fpComboBox)

Description  Sets and returns the text from the edit portions of an fpComboBox control.

Usage 	[form.]control.Text

Remarks 	When the Style property is set to 0 (Dropdown Combo) or 1 (Simple Combo), the Text property returns the text contained in the edit (or static) area of the combobox. When the Style property is set to 2 (Dropdown List), the Text property returns text of the selected item in the listbox.

For more information on the Text property, refer to the Text property in Visual Basics Language Reference.  The Text property is not available at design time and is read only at run time.

Data Type 	String

Applies To 	fpComboBox Control.

See Also 	SelLength, SelStart, SelText Properties.


TextDisabled
TextDisabled, TextFalse, TextTrue

Description  Sets the text displayed for each state of an fpBoolean control.

Usage	[form.]control.TextDisabled[ = text$]

[form.]control.TextFalse[ = text$]

[form.]control.TextTrue[ = text$]

Remarks 	The TextFalse or Caption property value is used when the other text display properties are not set.  For more information see the fpBoolean control Description in Chapter 3, Custom Controls.

Default	Empty String

Data Type 	String

Applies To	fpBoolean Control.

See Also	PictureFalse, PictureFalseDisabled, PictureFalseDown, PictureTrue, PictureTrueDisabled, PictureTrueDown Properties.

Example	Refer to AutoToggle property example.

Sub Form_Load ()

fpBoolean1.AutoToggle = False	'Disable auto toggle

fpBoolean1.BooleanMode = 0	'Set control to 2 state

fpBoolean1.BooleanStyle = 1	'Set control to text only

fpBoolean1.ToggleTrue = "yY"	'Characters to toggle True state

fpBoolean1.ToggleFalse = "nN"	'Characters to toggle False state

fpBoolean1.TextTrue = "True Text"	'Text shown in True state

fpBoolean1.TextFalse = "False Text"	'Text shown in False state

End Sub


TextMode

Description  Sets the mode for retrieving and setting bound text with the Text property.

Usage	[form.]control.TextMode[ = setting%]

Remarks 	Use the TextMode property to control the way data is retrieved from or written via the Text property.  The following settings are available:

Setting	Description
0	Normal:  Sets new text or reads the block of text (where a block of text is as many lines as will fit into a buffer no greater than 64K).
1	First:  Sets or reads the first block of text (where a block of text is as many lines as will fit into a buffer no greater than 64K).  This setting indicates that more text will be set or read after the first block of text.
2	Next:  New text is appended to the existing text or the next block of text is read.
3	Line:  Sets or reads a single line of text.  The LineIndex property determines the particular line of text.
Default	0 (Normal)

Data Type 	Integer (Enumerated)

Applies To	fpMemo Control.

See Also	LineIndex, Text Properties.

Example	This example writes text to the printer line by line from an fpMemo control.

Sub PrintFile ()

fpMemo.TextMode = 3	'Set text entry to line

Load PrintDialog

PrintDialog.Show modeless

On Error GoTo printerror

For i = 0 To fpMemo.LineCount

fpMemo.LineIndex = i

printer.Print fpMemo.Text

Next i

printer.NewPage

printer.EndDoc

printquit:

Unload PrintDialog

Exit Sub

printerror:

Resume printquit

End Sub


ThreeDFrameWidth
ThreeDFrameWidth, ThreeDInsideWidth, ThreeDOutsideWidth

Description  Set or retrieve the 3-D border widths of a control.

Usage 	[form.]control.ThreeDFrameWidth[ = value%]

[form.]control.ThreeDInsideWidth[ = value%]

[form.]control.ThreeDOutsideWidth[ = value%]

Remarks 	The 3-D border widths must be adjusted together in order to maximize the 3-D appearance of the control.  See the section Setting 3-D Borders in Chapter 2 for more details.

Default 	0 for all.

Data Type 	Integer

Applies To 	All Aware/VBX Controls except fpListBox and fpComboBox.

See Also 	ThreeDText Properties.

Example	This example initializes an array of 10 identical text boxes.  The 3-D borders for the control are set to change when the control loses focus.

Sub Form_Load ()

Dim i As Integer

For i = 0 To 9

fpText1(i).BorderStyle = 1	'Single Line

fpText1(i).OnFocusInvert3D = True

fpText1(i).ThreeDOutsideStyle = 1	'Lowered

fpText1(i).ThreeDOutsideWidth = 2

fpText1(i).Text = ""

Next i

End Sub


ThreeDInsideHighlightColor
ThreeDInsideHighlightColor, ThreeDOutsideHighlightColor

Description  Set or retrieve the 3-D highlight colors of the control.

Usage 	[form.]control.ThreeDInsideHighlightColor[ = color]

[form.]control.ThreeDOutsideHighlightColor[ = color]

Remarks 	The ThreeDInsideHighlightColor is the lighter color on the inner border of the control.  The ThreeDOutsideHighlightColor is the lighter color on the outer border of the control.  See the section Setting 3-D Borders in Chapter 2 for more details.

Default 	&H8000000F& (Windows System Button Face Color for ThreeDInsideHighlightColor, &H80000014& (Windows System Button Highlight Color) for ThreeDOutsideHighlightColor

Data Type 	Color

Applies To 	All Aware/VBX Controls except fpListBox and fpComboBox.

See Also 	ThreeDText Properties.

Example	This example shows an alternate way to set multiple 3-D properties by calling a sub-routine.

Sub Form_Load ()

fpTextThreeD.BorderStyle = 0

SetSide fpTextThreeD, True, 2, -1, -1, 0

SetSide fpTextThreeD, False, 1, -1, -1, 2

fpTextThreeD.ThreeDText = 4	'ThreeD text Raised

fpTextThreeD.ThreeDTextHighlightColor = RGB(255, 0, 0)

fpTextThreeD.ThreeDTextShadowColor = RGB(0, 0, 255)

fpTextThreeD.ThreeDTextOffset = 1

End Sub

Sub SetSide (Ctrl As Control, Inside%, SideStyle%, SideHColor&, SideSColor&, SideWidth%)

'If Inside style

If Inside Then

Ctrl.ThreeDInsideStyle = SideStyle%

'Use default color

If SideHColor& <> -1 Then

Ctrl.ThreeDInsideHighlightColor = SideHColor&

End If

'Use default color

If SideSColor& <> -1 Then

Ctrl.ThreeDInsideShadowColor = SideSColor&

End If

Ctrl.ThreeDInsideWidth = SideWidth%

Else 'Outside style

Ctrl.ThreeDOutsideStyle = SideStyle%

'Use default color

If SideHColor& <> -1 Then

Ctrl.ThreeDOutsideHighlightColor = SideHColor&

End If

'Use default color

If SideSColor& <> -1 Then

Ctrl.ThreeDOutsideShadowColor = SideSColor&

End If

Ctrl.ThreeDOutsideWidth = SideWidth%

End If

End Sub


ThreeDInsideShadowColor
ThreeDInsideShadowColor, ThreeDOutsideShadowColor

Description  Set or retrieve the 3-D shadow colors of the control.

Usage 	[form.]control.ThreeDInsideShadowColor[ = color]

[form.]control.ThreeDOutsideShadowColor[ = color]

Remarks 	The ThreeDInsideShadowColor is the darker color on the inner border of the control.  The ThreeDOutsideShadowColor is the darker color on the outer border of the control.  See the section Setting 3-D Borders in Chapter 2 for more details.

Default 	&H80000006& (Windows System Window Frame Color) for ThreeDInsideShadowColor, &H80000010& (Windows System Button Shadow Color) for ThreeDOutsideShadowColor

Data Type 	Color

Applies To 	All Aware/VBX Controls except fpListBox and fpComboBox.

See Also 	ThreeD Properties.

Example	Refer to ThreeDInsideHighlightColor, ThreeDOutsideHighlightColor properties example.


ThreeDInsideStyle
ThreeDInsideStyle, ThreeDOutsideStyle

Description  Set or retrieve the 3-D style of the borders of the control.

Usage	[form.]control.ThreeDInsideStyle[ = setting%]

[form.]control.ThreeDOutsideStyle[ = setting%]

Remarks 	Set the 3-D border styles in conjunction with the ThreeDFrameWidth property in order to create the most dramatic 3-D effect.  See the section Setting 3-D Borders in Chapter 2 for more details.  The following settings are available:

Settings	Description
0	None:  No 3-D appearance is used.
1	Lowered:  Shadow color used to color the bottom and right border sides, highlight color used to color the top and left border sides.
2	Raised:  Shadow color used to color the top and left border sides, highlight color used to color the bottom and right border sides.
Default	0 (None)

Data Type 	Integer (Enumerated)

Applies To 	All Aware/VBX Controls except fpListBox and fpComboBox.

See Also 	ThreeD Properties.

Example	Refer to ThreeDOutsideWidth property example.


ThreeDText

Description  Sets or retrieves the 3-D appearance of the text in the control.

Usage 	[form.]control.ThreeDText[ = setting%]

Remarks 	The ThreeDText property allows the user to set a 3-D appearance for the text in the control.  See the section Setting 3-D Text in Chapter 2 for more details.

Setting	Description
0	None: No 3-D appearance is used.
1	Etched.
2	Embossed.
3	Etched w/shading.
4	Embossed w/shading.
Default 	0 (None)

Data Type 	Integer (Enumerated)

Applies To  	All Aware/VBX Controls except fpBinary, fpCalendar, and fpMemo.

Note:  The fpCalendar control also supports 3-D Text but must be set with the Element properties.

See Also 	ThreeDTextShadowColor, ThreeDTextOffset Properties.


ThreeDTextHighlightColor
ThreeDTextHighlightColor, ThreeDTextShadowColor

Description  Set the highlight and shadow colors for the 3-D text in a control.

Usage 	[form.]control.ThreeDTextHighlightColor[ = color]

[form.]control.ThreeDTextShadowColor[ = color]

Remarks 	The ThreeDTextHighlightColor property is usually set to a light shade while the ThreeDTextShadowColor property is set to a dark shade to achieve the 3-D effect. See the section Setting 3-D Text in Chapter 2 for more details.

Default 	&H80000014& (Windows System Button Highlight Color) for ThreeDTextHighlightColor, &H80000010& (Windows System Button Shadow Color) for ThreeDTextShadowColor

Data Type 	Color

Applies To 	All Aware/VBX Controls except fpBinary, fpCalendar, and fpMemo.

See Also  	ThreeDText, ThreeDTextOffset Properties.


ThreeDTextOffset

Description  Sets the number of pixels that the shadow behind the text is offset in the control.

Usage 	[form.]control.ThreeDTextOffset[ = value%]

Remarks 	The ThreeDTextOffset property sets the width for the shadow and highlight to make the text appear more raised or lowered as needed.  As a general rule, the larger the font size, the larger the offset should be.  See the section Setting 3-D Text in Chapter 2 for more details.

Default	1 pixel

Data Type 	Integer

Applies To  	All Aware/VBX Controls except fpBinary, fpCalendar, and fpMemo.

See Also  	ThreeDText, ThreeDTextHighlightColor, ThreeDTextShadowColor Properties.


TimeDefault

Description  Sets or returns the default time used when the DateCalcMethod property is set to 1 (User default).

Usage	[form.]control.TimeDefault[ = text$]

Remarks	Use this time value to complete missing values (such as the hour or min) in the time when the DateCalcMethod is set to 1 (User default).  You can set a default date string for completing missing date values by setting the DateDefault property.

Default	Empty string

Data Type 	String

Applies To	fpDateTime Control.

See Also	DateCalcMethod Property.


TimeMin
TimeMin, TimeMax

Description  Sets or returns a minimum or maximum time the user can enter into an fpDateTime control.

Usage	[form.]control.TimeMax[ = text$]

[form.]control.TimeMin[ = text$]

Remarks	You can retrieve the maximum and minimum time settings or change them as needed with the TimeMax and TimeMin properties, respectively.  When a time is entered into an fpDateTime control which is outside the range of possible values set by the TimeMin or TimeMax property, a UserError event occurs, but the UserEntry property remains set to 1 (Formatted) as long as the entry is a valid time.  When data entered into an fpDateTime control is not a valid time, a UserError event occurs and the UserEntry property switched to 2 (FreeFormat) in order to allow the control to accept the entry.  When both the TimeMax and TimeMin properties are set to 0, no range check is performed on a time entry.

Default	000000, Returns the International Setting based on your Windows system configuration.

Data Type	String

Applies To	fpDateTime

See Also	DateMax, DateMin Properties., UserError Event.


TimeScale

Description  Determines the format of time strings in the fpClock control.

Usage	[form.]control.TimeScale[ = setting%]

Remarks	The TimeScale property applies only to the the AlarmTime, CurrentTime, ElapsedTime, and the StartTime properties in the control.  The display is not affected by the setting of the TimeScale property.  The TimeScale property lets you manipulate the time in your code easily.  For example, to add an hour to the StartTime, you can set the TimeScale property to 1 (Hours) and then add 1 to the StartTime property in your code.

The following settings are available:

Setting	Description
0	HH:MM:SS:NN
1	Hours.
2	Minutes.
3	Seconds.
4	Milliseconds.
Default	0 (HH:MM:SS:NN)

Data Type	Integer (Enumerated)

Applies To	fpClock Control.

See Also	AlarmTime, CurrentTime, ElapsedTime, StartTime Properties.


TimeString1159

Description  Sets the trailing string of characters to be appended to the time string for the morning hours between 00:00 and 11:59.

Usage	[form.]control.TimeString1159[ = text$]

Remarks	Allows the user to denote an appendix for the time.  For example, the user may set the character string for the TimeString1159 property as A.M. or am, and the character string for the TimeString2359 property as P.M. or pm.

Default	Empty String, returns the International Setting for the default appendix based on your Windows system configuration.

Data Type	String

Applies To	fpClock, fpDateTime Controls.

See Also	TimeString2359 Property.

Example	This example creates a time field to display the desired time in a 12 hour format, displaying either am or pm as appropriate.

Sub Form_Load ()

fpDateTime1.DateCalcMethod = 0	'Calculate missing values

'w/current time

fpDateTime1.DateTimeFormat = 4	'Show time only

fpDateTime1.Text = ""	'Set text to empty string

fpDateTime1.TimeString1159 = "am"	'Set morning appendix to am

fpDateTime1.TimeString2359 = "pm"	'Set evening appendix to pm

fpDateTime1.TimeStyle = 1	'Use 12 hour clock

End Sub


TimeString2359

Description  Sets the string of characters to be appended to the time string for the evening hours between 12:00 and 23:59 when in 12-hour clock format and for any 24 hour clock format.

Usage	[form.]control.TimeString2359[ = text$]

Remarks	Allows the user to denote an appendix for the time.  For example, the user may set the character string for the TimeString2359 property as P.M. or as GMT.

Default	Empty String, returns the International Setting for the default appendix based on your Windows system configuration.

Data Type	String

Applies To	fpClock, fpDateTime Controls.

See Also	TimeString1159 Property.

Example	Refer to TimeString1159 property example.


TimeStyle

Description  Determines how the time is calculated and displayed in the fpDateTime control.

Usage	[form.]control.TimeStyle[ = setting%]

Remarks	The following settings are available:

Setting	Description
0	Returns the International Setting based on your Windows system configuration.
1	12 hour clock.
2	24 hour clock.
Default	0, Returns the International Setting based on your Windows system configuration.

Data Type	Integer (Enumerated)

Applies To	fpDateTime Control.

See Also	TimeScale Property.

Example	Refer to TimeString1159 property example.


TimeValue

Description  Sets or retrieves the time in an fpDateTime control.

Usage	[form.]control. TimeValue[ = text$]

Remarks  	The TimeValue property sets or retrieves the time in an fpDateTime control in the format HH:MM:SS.  Set or retrieve the date with the DateValue property.  The TimeValue property is not available at design time.

Data Type 	String

Applies To 	fpDateTime control

See Also 	DateValue Property.


ToggleFalse
ToggleFalse, ToggleTrue

Description  Sets the characters that toggle the False and True state of the control, respectively.

Usage	[form.]control.ToggleFalse[ = text$]

[form.]control.ToggleTrue[ = text$]

Remarks	When the control is in focus, typing in any of the characters from the strings set by the ToggleFalse and ToggleTrue properties will cause the state of the control to toggle to the appropriate value.  The strings set by the ToggleFalse and ToggleTrue properties must be mutually exclusive.

Default	Empty String

Data Type	String

Applies To	fpBoolean Control.

See Also	AutoToggle Property.

Example	Refer to AutoToggle property example.


Top

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.Top[ = y]

Data Type 	Single

Applies To 	All Aware/VBX Controls.


TopIndex

Description  Sets or retrieves the index of the item appearing in the topmost visible row in fpComboBox and fpListBox controls.

Usage	[form.]control.TopIndex[ = value&]

Remarks	You can use the TopIndex property to establish which list items appear in the list portion of the control according to their numerical position.  The TopIndex property is not available at design time.

Default	0, returns the first item in the listbox

Data Type	Long

Applies To	fpCOmboBox, fpListBox Controls.

See Also	List, ListCount, Properties.


UnFmtText

Description  Sets or retrieves the unformatted contents of the control.

Usage 	[form.]control.UnFmtText[ = text$]

Remarks 	When the UnFmtText property is used, the contents of the field are returned without formatting characters.  The appearance of unformatted values depends on the type of control from which the data is being retrieved.

The format of the text box of each control is as follows:

Control	Text appearance
fpCurrency, fpDoubleSingle:	Value is returned without separator characters and with a period denoting the decimal point.
fpLongInteger:	Value is returned without separator characters.
fpDateTime:	YYYYMMDD HHMMSS Note: This format allows consistent access to an accurate representation of date and time data.  You can parse this format using string functions.
fpMask:	Text is returned without the literal characters.
fpText:	Returns the same value as the Text property.
Note:  The UnFmtText property uses a period to denote the decimal point in a numeric string.  The Value property uses the Windows International Setting.  Be careful to use the appropriate property when converting the string to a numeric value.  Visual Basic conversion functions, for example, expect the decimal point character to match the international setting.  Use the Value property in these situations.  C++ libraries, however, often expect the decimal character to be a decimal point.  Use the UnFmtText property in these situations.

Default 	Empty String

Data Type 	String

Applies To	fpCurrency, fpDateTime, fpDoubleSingle, fpLongInteger, fpMask Controls.

See Also 	Text, Value (Formatted Edit) Properties.


UserDefinedFormat

Description  Allows the user to define the display format of the date in the fpDateTime control.

Usage	[form.]control.UserDefinedFormat[ = text$]

Remarks	You can set your own format for displaying the time and/or date, including the separator characters, with the UserDefinedFormat property.  The following characters are used:

Character Value	Format
ap	Am/pm string: Uses am string for morning hours and pm string for evening hours when ClockMode =1 (12 hour clock). Uses pm string for evening hours when ClockMode = 2 (24 hour clock).
d	Numeric Days:  1-31.
dd	Numeric Days with lead zero:  01-31.
ddd	Weekdays:  Mon-Sun.
h	Hours:  1-24.
hh	Hours with lead zero:  01-24.
m	Numeric Months:  1-12.
mm	Numeric Months with lead zero:  01-12.
mmm	Text Months (abbreviated):  Jan-Dec.
mmmm	Text Months (long):  January-December.
nn	Minutes:  01-60.
ss	Seconds:  01-60.
yy	Numeric Year (abbreviated):  00-99.
yyyy	Numeric Year (long):  1900-2040.
The above format characters selected for Aware/VBX are a subset of those used for the Visual Basic Format$ function.  All can be used for both formatted display and user entry of data.

Note:  In order to access this property, the DateTimeFormat property must be set to 5 (User Defined).  See the section on International Settings in Chapter 2 for more information on setting the date and time.

Default	Empty String

Data Type 	String

Applies To	fpDateTime Control.

See Also	DateTimeFormat Property.

Example	This example displays a customized date field as month, day, year.  The spaces and commas separating the fields are also displayed.  The user must enter the date in the requested format.

Sub Form_Load ()

fpDateTime1.UserDefinedFormat = "mmmm d ,yyyy"

fpDateTime1.UserEntry = 0	'Formatted entry

End Sub


UserEntry

Description  Allows the developer to select how data will be accepted by the control.

Usage	[form.]control.UserEntry[ = setting%]

Remarks	The UserEntry property either restricts the user to a limited range of acceptable data or allows the user to have more freedom when typing in data.  The following settings are available:

Setting	Description
0	Formatted.
1	FreeFormat.
When the UserEntry property is set to FreeFormat, unformatted data is accepted into the control which currently is in focus.  The text field in the control accepts the data entered and evaluates it only when the control loses focus.  Valid entries at that time are accepted and the data is formatted.  Invalid entries cause an InvalidData event to fire and the data is not formatted.

Note: Days, months, years, hours, minutes, or seconds entered when the UserEntry property is set to 1 (FreeFormat) in an fpDateTime control must be separated by a valid separator character.  Valid separators are the colon, comma, dash, slash, or space keyboard characters.

When the UserEntry property is Formatted (the default value), character by character validation occurs.  Any character which does not fit the specific format is not accepted into the data field, and a UserError event is fired.

For more information on invalid data, refer to the section Handling Invalid Data in Chapter 2.

Default 	0 (Formatted) for all Formatted Edit Controls except fpDateTime, which defaults to 1 (FreeFormat).

Data Type 	Integer (Enumerated)

Applies To 	Formatted Edit Controls.

See Also 	CurrencyDecimalPlaces, DecimalPlaces, MaxValue, MinValue, UnFmtText Properties., InvalidData, UserError Event.s

Example	Refer to the CharValidationText property example.


UseSeparator

Description  Allows/Prevents display of the separator character.

Usage	[form.]control.UseSeparator[ = boolean%]

Remarks	When the UseSeparator property is set to True (the default value), the separator specified by the Separator property is used to separate thousands places in numbers with more than three digits.  For example, when the Separator property is set to a comma (,), and the UseSeparator property is True, the number 20347588.00 would be returned as 20,347,588.00  When the UseSeparator property is set to False, no separator marks the thousands places.

Note:  The separator is included in the return of the Text property.  Use the UnFmtText property to return the string without the separator character, even when the UseSeparator property is True.

Default	True

Data Type	Integer (Boolean)

Applies To	fpDoubleSingle, fpLongInteger Controls.

See Also	Separator Property.

Example	This example sets an fpLongInteger control to accept and display specified values.

Sub Form_Load ()

fpLongMinMax.NegFormat = 1 '-1	'Negative numbers use minus sign

fpLongMinMax.MaxValue = "5000"	'Specify maximum value

fpLongMinMax.MinValue = "-5000"	'Specify minimum value

fpLongMinMax.Separator = ","	'Use comma as separator

fpLongMinMax.UseSeparator = False	'Do not display separator char

End Sub


Value (Formatted Edit)

Description  Sets or retrieves the numeric representation of data in a control in the format of its respective control.

Usage 	[form.]control.Value[ = text$]

Remarks	Visual Basic does not support double and variant property types.  As a result, because double precision is required by the fpCurrency, fpDateTime, and fpDoubleSingle controls, the type of the Value property is a string.  The fpLong Value property is also a string to maintain consistency.  When the Value property is used in a numeric expression, convert the string to a numeric value using the Val ( ) function to avoid string concatenation.  Any expression that results in a numeric value automatically converts to a string when assigned to the Value property, so no explicit conversion is required.

Control	Text appearance
fpCurrency, fpDoubleSingle	Value is returned without separator characters.  The International Setting for the decimal point is used when needed.
fpLongInteger	Value is returned without separator characters.
fpDateTime	Value is returned as a date time serial number (ddddd.ttttt).   See the DateValue function in Visual Basics Language Reference for more information on using serial numbers.
Note:  The UnFmtText property uses a period to denote the decimal point in a numeric string.  The Value property uses the Windows International Setting.  Be careful to use the appropriate property when converting the string to a numeric value.  Visual Basic conversion functions, for example, expect the decimal point character to match the international setting.  Use the Value property in these situations.  C++ libraries, however, often expect the decimal character to be a decimal point.  Use the UnFmtText property in these situations.

Default 	0

Data Type 	String

Applies To 	fpCurrency, fpDateTime, fpDoubleSingle, fpLongInteger Controls.

See Also 	Text, UnFmtText Properties.

Example	This example uses the UnFmtText and Value properties to read, modify and display the different values of the data in the currency control.  This value is then displayed in the text control.

SubfpCurrencyEnglishPound_Change ()

'Update the other controls with the changes of this control

fpTextNoFormat.Text = fpCurrencyEnglishPound.UnFmtText

fpTextValue.Text = fpCurrencyEnglishPound.Value

End Sub


Value (fpBoolean)

Description  Sets or retrieves the value of the selected state of the control.

Usage 	[form.]control.Value[ = value%]

Remarks 	For the fpBoolean control, the value returned by the Value property depends both on the state of the control and how the data is bound to a database.  The available numeric control states are False, True, and Disabled, which are represented numerically by the numbers 0, 1, and 2, respectively.  Data bound to a numeric field in the database returns the value of the Value property numerically as 0, 1, or 2, depending on the state of the control.  Data bound to a text field in the database returns the value of the Value property as whatever string has been set for that state by the TextTrue, TextFalse, or TextDisabled property.

Note:  The Value (fpBoolean) property represents the state of an individual fpBoolean control.  When in a group the value of the group can be obtained by oring the GroupValue of All Aware/VBX Controls with a True value together (Multiselect).

Default 	0

Data Type 	Integer

Applies To 	fpBoolean Control.

See Also 	Text, TextTrue, TextDisabled, TextFalse, SelLength, SelStart, SelText, UnFmtText Properties.


VirtualMode

Description  Sets fpComboBox and fpListBox controls to turn on Virtual Mode.

Usage	[form.]control.VirtualMode[ = boolean%]

Remarks	When the VirtualMode property is True, the combobox or listbox maintains only one screens worth of data from the database at a time.  When the VirtualMode property is False (the default value), all data is retrieved from the database at once.

Default	False

Data Type	Integer (Boolean)

Applies To	fpComboBox, fpListBox Controls.

See Also	VirtualScrollMax Property.


VirtualScrollMax

Description  Sets the actual number of rows in an fpComboBox or fpListBox control when the control is in Virtual Mode.

Usage	[form.]control.VirtualScrollMax[ = value%]

Remarks	When the VirtualMode property is True, the scrollbar range is not set until all rows are read from the database.  Therefore, the scrollbar thumb may not reflect the actual position.  To ensure that the thumb reflects the current position, you must compute the number of rows before displaying the data and set the range with the VirtualScrollMax property accordingly.  Note that this process is time consuming.

Default	0

Data Type	Long

Applies To	fpComboBox, fpListBox Controls.

See Also	VirtualMode Property.


Visible

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.Visible[ = boolean%]

Data Type 	Integer (Boolean)

Applies To 	All Aware/VBX Controls.


WeekDayHdr

Description  Sets or retrieves the weekday heading display style in an fpCalendar control.

Usage 	[form.]control.WeekDayHdr[ = setting%]

Remarks 	Use the WeekDayHdr property to customize the header row which displays the days of the week for the calendar.  The following settings are available:

Setting	Description
0	None:  No weekday header row displayed.
1	1 Letter:  First letter of each weekday displayed in the header row.
2	2 Letter:  First 2 letters of each weekday displayed in the header row.
3	3 Letter:  Three letters of each weekday displayed in the header row.
4	Long Word:  The full name for each weekday displayed in the header row.
Note:  The HeaderStyle property setting does not effect the WeekDayHdr property settings.

Default 	3 (Three Letters)

Data Type 	Integer (Enumerated)

Applies To 	fpCalendar

See Also 	HeaderStyle, MonthHeaderStyle, YearHeaderStyle Properties.


Width

Description  Refer to Visual Basic's Language Reference.

Usage 	[form.]control.Width[ = value%]

Data Type 	Integer (Real)

Applies To 	All Aware/VBX Controls.


WordWrap

Description  Determines whether to word wrap in an fpMemo control.

Usage	[form.]control.WordWrap[ = boolean%]

Remarks	When the WordWrap property is set to True, text wraps upon reaching the boundary specified by the PageWidth property.  When the WordWrap property is set to False (the default value), every line ends with a carriage return.  A paragraph character marks the carriage return if the ShowEOL property is set to True.

Default	False

Data Type	Integer (Boolean)

Applies To	fpMemo Control.

See Also	PageWidth Property.


WrapList

Description  Allows or prevents wrapping of a single column of data in an fpListBox control.

Usage	[form.]control.WrapList[ = boolean%]

Remarks	When the WrapList property is True, items from the single column are arranged in snaking columns, filling the first column, then the second, and so on.  A horizontal scroll bar is displayed if necessary.  When the WrapList property is set to True at design time, all multiple column support is disabled (no Col properties can be used). The ColWidth property sets the column width.

When the WrapList property is False, each column must be set to display data individually using the Col properties.

Default	False

Data Type	Integer (Boolean)

Applies To	fpListBox Control.

See Also	Col, Columns, ColWidth Properties.


Events

Advance Event	Alarm Event
ButtonHit Event	Change (fpCalendar) Event
Change Event	ChangeMode Event
Click (Formatted Edit) Event	CloseUp Event
DblClick (Formatted Edit) Event	DblClick (fpCalendar) Event
DragDrop Event	DragOver Event
DropDown Event	GotFocus Event
InvalidData Event	Keydown Event
KeyPress Event	KeyUp Event
LostFocus Event	MouseDown Event
MouseMove Event	MouseUp Event
MoveHand Event	PopUp Event
SelChange Event	Timer Event
UserError Event


dvance Event
Advance Event

Description  Occurs when the caret moves up, down, left, right, or when the caret is on the top row, bottom row, first row, or last row, respectively.

Syntax 	fpControl1_Advance (Direction As Integer, AutoAdvance As Integer)

Remarks 	The Advance event uses these arguments:

Argument	Description
Direction	Indicates the action that generated the event.
1	Right.
2	Left.
3	Down.
4	Up.
AutoAdvance	When True: if Direction is 1 or 3, focus is passed to the next control in the tab order.
	When True: if Direction is 2 or 4, focus is passed to the previous control in the tab order.
	When False: a UserError event is generated.   Note: The value of this parameter depends on the setting of the AutoAdvance property.  The value can be changed during the event by the application to prevent or cause advancement.
Applies To	Formatted Edit Controls.

See Also	AutoAdvance Property.

Example	This example sets the control to advance when the <UpArrow> or <DownArrow> is pressed, regardless of the AutoAdvance property setting.

Sub fpText1_Advance (Direction As Integer, AutoAdvance As Integer)

If (direction = 3 or direction = 4) then AutoAdvance = True

End Sub


Alarm Event

Description  Occurs when the value of the CurrentTime property equals the value of the AlarmTime property.

Syntax	fpClock1_Alarm ()

Remarks	The CurrentTime property is updated prior to firing the Alarm event.

Applies To 	fpClock Control.

See Also	AlarmTime, CurrentTime Properties.

Example	This example sounds a tone when the Alarm event is fired.

Declare Function startsound Lib "sound.drv" () As Integer

Declare Function OpenSound% Lib "sound.drv" ()

Declare Function SetVoiceSound% Lib "sound.drv" (ByVal nsource%, ByVal Freq&, ByVal nDuration%)

Declare Function CloseSound% Lib "sound.drv" ()

Declare Function WaitSoundState% Lib "sound.drv" (ByVal mState%)

Sub fpClock1_Alarm ()

'Initialize and set variables

t = OpenSound()

duration% = 500

frequency& = 400

frequency& = frequency& * 65536

t = SetVoiceSound(1, frequency&, duration%)

t = startsound()

While (WaitSoundState(0) <> 0): Wend	'Beep until time elapses

t = CloseSound()	'Close file

End Sub


ButtonHit Event

Description  Occurs when a button is hit in any formatted edit control.

Syntax	fpControl1_ButtonHit (Direction As Integer, NewIndex As Integer)

Remarks	The ButtonHit event has two parameters, Direction and NewIndex, both of which can be modified.  The Direction returned indicates which button within the control has been hit.

Any change to the ButtonIndex property in the event is overwritten when the NewIndex is applied following the event.  The following arguments apply:

Argument	Description
Direction	Contains the direction of the button pressed within the control.
0	None:  NewIndex is not applied to the ButtonIndex property after the event occurs and no button default action occurs.
1	Left Slide.
2	Right Slide.
3	Up Spin.
4	Down Spin.
5	Ellipse (PopUp).
6	DropDown.
	Note:  For Direction arguments 1-6, the value can be changed to 0 to ngate the event.
NewIndex	New ButtonIndex value.
Upon completion of a ButtonHit event, the ButtonIndex property is set equal to the value of the NewIndex unless the Direction is set to 0.

Note: Set the ButtonDefaultAction property to False to disable default button behavior for a control.

Applies To 	Formatted Edit Controls.

See Also	ButtonDefaultAction, ButtonIndex Properties.

Example	This example sets a popup button in an fpText control to display a dialog box asking the user to enter a number.

Sub Form_Load ()

fpText1.ButtonStyle = 2	'Set button style to PopUp

fpText1.Text = ""	'Set text as empty string

End Sub

Sub fpText1_ButtonHit (Button As Integer, NewIndex As Integer)

Dim answer

answer = InputBox$("Please enter a number :", "Aware/VBX")

fpText1.Text = answer

End Sub


Change Event

Refer to Visual Basic's Language Reference.


Change (fpCalendar) Event

Description  Occurs each time the current date changes.

Syntax 	fpCalendar1_Change (OldMonth As Integer, OldDay As Integer, OldYear As Integer, NewMonth As Integer, NewDay As Integer, NewYear As Integer, Cancel As Integer)

Remarks	The CurrentDate is set to the NewMonth, NewDay, and NewYear before the Change event is fired.  If the Cancel parameter is set to True, however, the CurrentDate returns the OldMonth, OldDay, and OldYear settings upon leaving the event.  Therefore, it is possible to change the CurrentDate setting once the event is fired.  The Change event uses these arguments:

Argument	Description
OldMonth	Returns the month for the previously displayed date.
OldDay	Returns the day for the previously displayed date.
OldYear	Returns the year for the previously displayed date.
NewMonth	Returns the new month for the date.
NewDay	Returns the new day for the date.
NewYear	Returns the new year for the date.
Cancel	Set Cancel to True to prevent the new date from replacing the old date.
The parameters show you the new date and the previous date.  To determine if the current month has changed, for example, simply compare the OldMonth to the NewMonth.

Applies To 	fpCalendar Control.

See Also	CurrentDate Property.

Example	This example changes the foreground and background color of a calendar day when a new day is selected.

Sub fpCalendar1_Change (OldMonth As Integer, OldDay As Integer, OldYear As Integer, NewMonth As Integer, NewDay As Integer, NewYear As Integer, Cancel As Integer)

If (NewDay <> OldDay) then

fpCalendar1.Element = 6

fpCalendar1.ElementIndex = NewDay

fpCalendar1.ElementBackColor = RGB(128, 128, 128)

fpCalendar1.ElementForeColor = RGB(255, 0, 0)

End If

End Sub


ChangeMode Event

Description  Occurs when the <Insert> key is pressed to change the EditMode.

Syntax 	Sub fpText1_ChangeMode (EditMode As Integer)

Remarks	The ChangeMode event always occurs following the GotFocus event.  The ChangeMode event uses this argument:

Argument	Description
EditMode	Specifies the edit mode for a control which gets focus.
0	Insert Mode.
1	Overwrite Mode.
The value of the EditMode parameter can be modified to prevent a change to the EditMode.

Applies To 	Formatted Edit Controls and fpMemo.

See Also	GotFocus Event.

Example 	This example updates a static control to display the current edit mode.

Sub fpText1_ChangeMode (EditMode As Integer)

if (EditMode = 0) then

fpText5 = "Insert"

else

fpText5 = "OverWrite"

end if

End Sub


Click (Formatted Edit) Event

Description  Occurs when the left or right mouse button is pressed once.  This event follows the MouseUp event.  The Aware/VBX Click event is similar to the Click event for standard Visual Basic controls except that the Button parameter indicates whether the left or right mouse button was pressed.

Syntax 	Sub fpControl1_Click (Button As Integer)

Remarks	The Click event is fired regardless of the ControlType property setting.  The following argument applies:

Argument	Description
Button	The Button parameter identifies the button which has been clicked.  The following values are available:
0	Prevents the standard action of the mouse.
1	Indicates a left button click.
2	Indicates a right button click.
Applies To 	Formatted Edit Controls, fpComboBox and fpListBox.

See Also	ControlType Property, MouseUp Event.

Example	This example causes a beep to sound when you click the right mouse button, or displays text when the left mouse button is clicked.

Sub fpCurrency1_Click (Button As Integer)

If button = 2 Then	'Right

Beep

Else

fpText1.Text = "Are you sure you want to delete this item?"

End If

End Sub


CloseUp Event

Description  Occurs when the list portion of an fpComboBox control closes up.

Syntax	fpComboBox1_CloseUp ()

Remarks	This event does not occur when the Style property is set to 1 (Simple Combo).  Use the CloseUp event to make changes to a list (such as adding or removing items) after the user has made a selection.

Applies To 	fpComboBox Control.

See Also	Style Property, DropDown Event.


DblClick (fpCalendar) Event

Description  Occurs each time the user double clicks within a day.

Syntax	fpCalendar_DblClick (CurrentMonth As Integer, CurrentDay As Integer, CurrentYear As Integer)

Remarks	The DblClick event uses these arguments:

Argument	Description
CurrentMonth	Returns the month for the date double clicked in the control.
CurrentDay	Returns the day for the date double clicked in the control.
CurrentYear	Returns the year for the date double clicked in the control.
Note:  If the user double clicks an area other than a day, the DblClick event is not sent.  The current month, day, and year that were double clicked are passed to the event as parameters.

Applies To 	fpCalendar Control.

See Also	CurrentDate Property.

Example	This example changes the foreground and background of a day when it is double clicked on.

Sub fpCalendar1_DblClick (CurrentMonth As Integer, Currentday As Integer, CurrentYear As Integer)

fpCalendar1.Element = 6

fpCalendar1.ElementIndex = currentday

fpCalendar1.ElementBackColor = RGB (0, 0, 255)

fpCalendar1.ElementForeColor = RGB (255, 0, 0)

End Sub


DblClick (Formatted Edit) Event

Description  Occurs when the left or right mouse button is pressed twice.  This event follows the MouseUp event.  The Aware/VBX DblClick event is similar to the DblClick event for standard Visual Basic controls except that the Button parameter indicates whether the left or right mouse button was pressed.  The Button parameter can be changed to zero to prevent default double click behavior (text selection).

Syntax	Sub fpText1_DoubleClick (Button As Integer)

Remarks	The following argument applies:

Argument	Description
Button	The Button parameter identifies the button which has been double clicked.  The following values are available:
0	Prevents the standard action of the mouse (normally, a double clicked button selects text in the control).
1	Indicates that the left button was double clicked.
2	Indicates that the right button was double clicked.
Applies To 	Formatted Edit Controls.

See Also	MouseUp Event.

Example	This example displays the fpText1 control upon double clicking the left mouse button and removes the fpText1 control upon double clicking the left mouse button again.  It displays the fpText2 control upon double clicking the right mouse button and removes the fpText2 control upon double clicking the right mouse button again.

Sub fpCurrency1_DoubleClick (Button As Integer)

If Button = 1 Then 	'Left

If Not fpText1.Visible Then

fpText1.Visible = True

Else

fpText1.Visible = False

End If

Else	'Right

If Not fpText2.Visible Then

fpText2.Visible = True

Else

fpText2.Visible = False

End If

End If

End Sub


DragDrop Event

Refer to Visual Basic's Language Reference.


DragOver Event

Refer to Visual Basic's Language Reference.


DropDown Event

Description  Occurs when the list portion of an fpComboBox is about to drop down.

Syntax	fpComboBox1_DropDown (Index As Integer)

Remarks	This event does not occur when the Style property is set to 1 (Simple Combo).  Refer to Visual Basics Language Reference for a complete description of this event.

Applies To 	fpComboBox Control.

See Also	Style Property, DropDown Event.


GotFocus Event

Refer to Visual Basic's Language Reference.


InvalidData Event

Description  Occurs following the LostFocus event when the content of the control is not valid.

Syntax	fpText1_InvalidData (NextWnd As Integer)

Remarks 	The InvalidData event occurs:

1.	When the UserEntry property is set to 1 (FreeFormat).  The FreeFormat setting allows unrestricted data entry, so no validation is done until the control loses focus.

2.	When the minimum numeric value is greater than zero or the maximum numeric value is less than zero.

3.	When the RequireFill property is set to True for masked input and the mask is not filled when the control loses focus.

The following argument is used:

Argument	Description
NextWnd	Specifies the Window handle of the next control to get focus.
0	Sets focus to remain on the current control.
You can set a message box to display during the InvalidData event.  However, the message box initially takes focus.  After the message box is displayed, focus can be changed to any application.  When the message box is closed, focus returns to the form with the control which fired the event.

Applies To 	Formatted Edit Controls.

See Also	RequireFill Property, UserError,  LostFocus Events.

Example	This example displays a dialog box signaling invalid data entry when invalid data is entered in the control.

Sub fpMask3_InvalidData (NextWnd As Integer)

MsgBox "Data in this control is invalid. Concentrate and try again."

End Sub


Keydown Event

Refer to Visual Basic's Language Reference.


KeyPress Event

Refer to Visual Basic's Language Reference.


KeyUp Event

Refer to Visual Basic's Language Reference.


LostFocus Event

Refer to Visual Basic's Language Reference.


MouseDown Event

Refer to Visual Basic's Language Reference.


MouseMove Event

Refer to Visual Basic's Language Reference.


MouseUp Event

Refer to Visual Basic's Language Reference.


MoveHand Event

Description  The MoveHand event occurs when the AllowMoveHand property is set to True and the user drags and drops a clock hand.

Syntax	fpClock1_MoveHand (NewHour As Integer, NewMinute As Integer, NewSecond As Integer, OldHour As Integer, OldMinute As Integer, OldSecond As Integer)

Remarks	The CurrentTime property is not updated until the mouse button is released and the Change event is fired.  Use the following arguments to get the new value.

Argument	Description
NewHour	Returns the new hour displayed.
NewMinute	Returns the new minute displayed.
NewSecond	Returns the new second displayed.
OldHour	Returns the hour for the previously displayed time.
OldMinute	Returns the minute for the previously displayed time.
OldSecond	Returns the second for the previously displayed time.
Cancel	Set Cancel to True to prevent the new time from replacing the old time.
Applies To 	fpClock Control.

See Also	AllowMoveHand, CurrentTime Properties, Change Event.

Example	This example allows you to move the hands in one clock (fpClock1), show the adjusted time in a second clock (fpClock2), and use the time displayed in the second clock as the AlarmTime for the third clock (fpClock3).

Sub fpClock1_MoveHand (OldHour As Integer, OldMin As Integer, OldSec As Integer, NewHour As Integer, NewMin As Integer, NewSec As Integer)

fpClock2.CurrentTime = Format(NewHour, "00") + "." + Format(NewMin, "00") + "." + Format(NewSec, "00")

fpClock3.AlarmTime = fpClock2.CurrentTime

End Sub


PopUp Event

Description  The PopUp event occurs when the user presses <F4> in an fpDateTime control.

Syntax	fpDateTime1_PopUp ()

Remarks	Use this event to customize the PopUp calendar.

Argument	Description
Cancel	Set Cancel to True to prevent the default calendar from popping up.
Applies To 	fpDateTime Control

Example	This example allows you to pop up a customized calendar and/or clock instead of using the default popup calendar.  Note that you must set the Click event to return the date and/or time when using a customized calendar (See OK_Click subroutine below).

Sub fpDateTime1_PopUp (Cancel As Integer)

Cancel = True

form2.fpCalendar1.CurrentDate = Left$(fpDateTime1.UnFmtText, 8)

newtime = Mid$(fpDateTime1.UnFmtText, 10, 2) + ":" + Mid$(fpDateTime1.UnFmtText, 12, 2) + ":" + Mid$(fpDateTime1.UnFmtText, 14, 2)

form2.fpClock1.CurrentTime = Newtime

form2.Show

End Sub

Sub OK_Click ()	'This is the code for form 2

newdt = Format(fpcalendar1.Month, "00") + "-" + Format(fpcalendar1.Day, "00") + "-" + Format(fpcalendar1.Year, "0000")

newdt = newdt + " " + fpclock1.CurrentTime

form1.fpDateTime1.Text = newdt

Unload Me

End Sub


SelChange Event

Description  Occurs when the user changes the selection in a combobox or listbox.

Syntax	fpComboBox1_SelChange ()

Remarks	Use a SelChange procedure to make updates to a list before the user closes the list. You can trigger the SelChange event in code by changing the selected item(s) with the Row and Col properties

Applies To 	fpComboBox Control.

See Also	Col, Row Properties.


Timer Event

Description  Occurs each time the interval set by the Interval property is reached.

Syntax	fpClock_Timer

Remarks	After the Timer event fires, the current time based on the new interval is set in the control and then a Change event occurs to indicate that the time has indeed been changed.  The CurrentTime property is not updated until the Change event is fired.

Applies To	fpClock Control.

See Also	CurrentTime, Interval Properties, Change Event.


UserError Event

Description  The UserError event occurs when a user action cannot be processed or is invalid.

Syntax	fpText1_UserError (EventCode As Integer, AutoBeep As Integer)

Remarks	The following arguments are available:

Argument	Description
AutoBeep	Defaults to the value of the AutoBeep property, and may be altered programmatically to prevent or force a beep in response to the UserError event.
ErrorCode	Identifies the error which has occurred.  Possible ErrorCode values are:
ErrorCode	Explanation
1	Invalid character:  Occurs when an invalid character is pressed (Formatted UserEntry only): In an fpMask control,  In an fpText control set with a CharValidationText string,  In an fpDateTime control, or In any numeric control for nonnumeric characters, such as separators, decimal points, currency symbols, or negative signs.
2	InvalidMovement:  Occurs when an attempt is made to move the cursor left of the first character or right of the last character.  Not fired when the AutoAdvance property is set to True.
3	InvalidAction:  Acts as a catchall for events not specifically addressed.
4	ExceedLimit:  Occurs when a character entry causes the length of the data to exceed the maximum limit as set by the MaxLength property.
5	ButtonMin:  Occurs when a button hit causes the value of the ButtonIndex property to be less than the value set by the ButtonMin property.  Only fired when the ButtonWrap property is set to False.
6	ButtonMax:  Occurs when a button hit causes the value of the ButtonIndex property to be greater than the value set by the ButtonMax property.  Only fired when the ButtonWrap property is set to False.
7	OutOfRange:  Occurs when a default button action causes the value to exceed the minimum or maximum value as set by the MinValue or MaxValue property, respectively.
Applies To 	Formatted Edit Controls.

See Also	AutoBeep Property.

Example	This example sets the control to beep on an Invalid Movement only, regardless of the AutoBeep property setting.

Sub fpText1_UserError (EventCode As Integer, AutoBeep As Integer)

if (EventCode = 4) then

AutoBeep = TRUE

else

AutoBeep = FALSE

end if

End Sub


C++ Usage

Aware/VBX and C++

Aware/VBX Header Files

Using Aware/VBX with MFC

Using Aware/VBX with OWL

Using FarPoints AWAREVBX.H


Aware/VBX and C++

Aware/VBX Header Files

AWAREDEF.H

Other Headers

Using Aware/VBX with MFC

Topics

Sample Code

VBX Runtime Support

Loading and Unloading VBX Libraries

Constructing and Creating a VBX Control

Registering and Responding to Events

Adding an Aware/VBX Control to a Dialog

Using Aware/VBX with OWL

References

Topics

Sample Code

VBX Runtime Support

Loading and Unloading VBX Libraries

Constructing and Creating a VBX Control

Registering and Responding to Events

Adding an Aware/VBX Control to a Dialog

Using FarPoints AWAREVBX.H

Methods

Sample Code

Using AWAREVBX.H with MFC

In A Window

In An Event

In A Dialog

Using AWAREVBX.H with OWL

In A Window

In An Event

In A Dialog


Aware/VBX and C++

The most recent C++ development environments from Microsoft, Borland, and Symantec all support Visual Basic (VBX) 1.0-compatible controls.  Both Microsoft and Symantec use MFCs VBX emulation and require the use of the MFC CVBControl class, while Borland provides a VBX emulation and two OWL classes, TVbxControl & TVbxEventHandler.  All Aware/VBX controls are 1.0-compatible and the standard installation installs header files to support each of these environments.


Aware/VBX Header Files

The default Aware/VBX installation installs four header files in the \AWARE\INCLUDE directory:  AWAREDEF.H, AWAREMFC.H, AWAREOWL.H, AWAREVBX.H.

AWAREDEF.H

This header file defines constants for property and event indexes and for enumerated properties.  Use AWAREDEF.H when using the CVBControl and TVbxControl get and set property member functions.  Using the property or event index is nearly twice as fast as using the corresponding name.

Other Headers

The following C++ header files include the constant definitions for enumerated properties and hard-code the property and event indexes.  AWAREDEF.H is not required.

-     AWAREMFC.H

C++ classes in AWAREMFC.H are derived from the CVBControl class.  This header file includes overloaded constructors, a get and set property member function for each property, and macros for parsing event parameters.

-     AWAREOWL.H

C++ classes in AWAREOWL.H are derived from the TVbxControl class.  This header file includes overloaded constructors, a get and set property member function for each property, and macros for parsing event parameters.  These classes are nearly identical to the classes generated using Borlands VBXGEN utility.

-     AWAREVBX.H

FarPoints C++ classes in AWAREVBX.H support all three C++ environments. This header file includes overloaded constructors, a member function for each property that is identical to the corresponding Visual Basic property, and macros for parsing event parameters.

Each header file works differently with Aware/VBX.  The example sections below explain how to use the headers with different classes.  Sample code extracts for each method are also provided.


Using Aware/VBX with MFC

References

Before using Aware/VBX with MFC, you should read the documentation on using VBX controls with MFC to better understand the classes and macros that the AWAREMFC header file implements.  The documentation available with MFC 2.0 includes:

-     Chapter 17 of the Class Library Users Guide, Programming with VBX controls

-     Class Library Reference, Reference Volume, CVBControl

-     MFC Technical Note #27

Topics

Using Aware/VBX in an MFC application requires an understanding of the following topics.

-     Enabling VBX Runtime Support.

-     Loading and Unloading Aware/VBX Libraries.

-     Constructing or Creating Aware/VBX Controls.

-     Optionally Registering and Responding to Aware/VBX Events.

-     Adding Aware/VBX Controls to Dialogs.

Sample Code

The code extracts in this section are taken from a clock application written using Aware/VBX and AWAREMFC.H.  The Aware/VBX default installation installs the complete source for this application in the following directory:

\AWARE\SAMPLES\MFC\CLOCK

VBX Runtime Support

To enable VBX runtime support, overload CApp::InitInstance() and include a call to EnableVBX().

BOOL CClockApp::InitInstance()

{

  EnableVBX();

  return TRUE;

}

Loading and Unloading VBX Libraries

The CVBControl automatically loads and unloads VBX libraries when needed.  To optimize an application so Aware/VBX libraries load only once, add a call to LoadVBXFile(CString) in InitInstance() and a call to UnloadVBXFile(CString) in ExitInstance() for each library required by your application.

BOOL CClockApp::InitInstance()

{

  EnableVBX();

  LoadVBXFile("awarecc.vbx");

  return TRUE;

}

int CClockApp::ExitInstance()

{

  UnloadVBXFile("awarecc.vbx");

  return CWinApp::ExitInstance();

}

Constructing and Creating a VBX Control

To add an Aware/VBX control to a window, you must include AWAREMFC.H, add a control object to the window class, and call the control objects Create method when the window is created.  Initial property settings are assigned after the object is created.

#include "stdafx.h"

#include "resource.h"

#include "awaremfc.h"

class CClockWnd : public CFrameWnd

{

  protected :

    CAwareClock m_Clock;

  public :

    virtual BOOL Create();

};

BOOL CClockWnd::Create()

{

  CRect rectClock(100, 100, 100, 100);

  CFrameWnd::Create(

    NULL, "Aware/VBX Clock", WS_OVERLAPPEDWINDOW,

    rectDefault, NULL, "MainMenu"

  );

  m_Clock.Create(NULL, rectClock, this, IDC_CLOCK);

  m_Clock.SetAllowMoveHand(CLK_ALLOWMOVEHAND_LEFT_BUTTON);

  m_Clock.SetBorderStyle(CLK_BORDERSTYLE_NO_BORDER);

  m_Clock.SetClockStyle(CLK_CLOCKSTYLE_ANALOG);

  return TRUE;

}

Registering and Responding to Events

Event handling is not required when creating a control using Aware/VBX with MFC.  However, applications often need some event handling.  To handle events using MFC, register the event, add an entry to the message map of the parent window of the control object, and implement the message handler.  MFC passes a pointer to event parameters to the message handler.  AWAREMFC.H defines macros to cast this pointer to extract each event parameter.

The Clock example implements an event handler for the Click event.

#include "stdafx.h"

#include "resource.h"

#include "awaremfc.h"

//////////////////////////////////////////////////////////////////////

//Register the VBX events used in the Clock application.

//

UINT VBN_CLICK = AfxRegisterVBEvent("Click");

//////////////////////////////////////////////////////////////////////

//The following class implements the Clock application's main window.

//

class CClockWnd : public CFrameWnd

{

  protected :

    CAwareClock m_Clock;

  public :

    virtual BOOL Create();

  protected :

    afx_msg void OnClick(UINT, int, CWnd*, LPVOID lpParams);

    afx_msg void OnSize(UINT nType, int x, int y);

  DECLARE_MESSAGE_MAP()

};

//////////////////////////////////////////////////////////////////////

BEGIN_MESSAGE_MAP(CClockWnd, CFrameWnd)

  ON_VBXEVENT(VBN_CLICK, IDC_CLOCK, OnClick)

  ON_WM_SIZE()

END_MESSAGE_MAP()

//////////////////////////////////////////////////////////////////////

afx_msg void CClockWnd::OnClick(UINT, int, CWnd*, LPVOID lpParams)

{

  int iButton = CLK_CLICK_BUTTON(lpParams);

  if( iButton == 2)  // if right button click

  {

    switch( m_Clock.GetAnalogTicks() )

    {

      case CLK_ANALOGTICKS_NONE :

        m_Clock.SetAnalogTicks(CLK_ANALOGTICKS_HOUR);

        break;

      case CLK_ANALOGTICKS_HOUR :

        m_Clock.SetAnalogTicks(CLK_ANALOGTICKS_MINUTE);

        break;

      case CLK_ANALOGTICKS_MINUTE :

        m_Clock.SetAnalogTicks(CLK_ANALOGTICKS_BOTH);

        break;

      case CLK_ANALOGTICKS_BOTH :

        m_Clock.SetAnalogTicks(CLK_ANALOGTICKS_NONE);

        break;

    }

  }

}

//////////////////////////////////////////////////////////////////////

afx_msg void CClockWnd::OnSize(UINT nType, int cx, int cy)

{

  m_Clock.MoveWindow(0, 0, cx, cy);

}

Adding an Aware/VBX Control to a Dialog

To add an Aware/VBX control to a dialog using MFC, add a member variable, initialize it to NULL in the dialog contructor and initialize the variable using DDX_VBControl in DoDataExchange.  Initial property settings are set in InitDialog.

//////////////////////////////////////////////////////////////////////

//The following class implements the Clock application's about box.

//

class CAboutDlg : public CDialog

{

  protected :

    CAwareClock* m_pClock;

  public :

    CAboutDlg();

  protected :

    virtual void DoDataExchange(CDataExchange* pDX);

    virtual BOOL OnInitDialog();

};

//////////////////////////////////////////////////////////////////////

CAboutDlg::CAboutDlg() : CDialog(IDD_ABOUTBOX)

{

  m_pClock = NULL;

}

//////////////////////////////////////////////////////////////////////

void CAboutDlg::DoDataExchange(CDataExchange* pDX)

{

  CDialog::DoDataExchange(pDX);

  DDX_VBControl(pDX, IDC_CLOCK, m_pClock);

}

//////////////////////////////////////////////////////////////////////

BOOL CAboutDlg::OnInitDialog()

{

  CDialog::OnInitDialog();

  m_pClock->SetAnalogTicks(CLK_ANALOGTICKS_HOUR);

  m_pClock->SetClockStyle(CLK_CLOCKSTYLE_ANALOG);

  return TRUE;

}


Using Aware/VBX with OWL

References

Before using Aware/VBX with OWL, you should read the documentation on using VBX controls with OWL to better understand the classes and macros that the AWAREOWL header file implements.  The documentation available with OWL 2.0 includes:

-     Object Windows Reference Guide, TVbxControl & TVbxEventHandler.

Topics 	Using Aware/VBX in an OWL application requires an understanding of the following topics.

-     Enabling VBX Runtime Support.

-     Loading and Unloading Aware/VBX Libraries.

-     Constructing or Creating Aware/VBX Controls.

-     Optionally Registering and Responding to Aware/VBX Events.

-     Adding Aware/VBX Controls to Dialogs.

Sample Code

The code extracts in this section are taken from a clock application written using Aware/VBX and AWAREOWL.H.  The Aware/VBX default installation installs the complete source for this application in the following directory:

\AWARE\SAMPLES\OWL\CLOCK

VBX Runtime Support

To enable VBX runtime support, instanciate a TBIVbxLibrary object in OwlMain().

int OwlMain(int /*argc*/, char* /*argv*/ [])

{

  TClockApp theApp;

  TBIVbxLibrary vbxLib;

  return theApp.Run();

}

Loading and Unloading VBX Libraries

The TVbxControl will automatically load and unload VBX libraries when needed.

Constructing and Creating a VBX Control

To add an Aware/VBX control to a window, you must include AWAREOWL.H, add a control object pointer to the window class, and construct a control object in the window constructor.  Initial property settings are assigned in the SetupWindow function.

#include <owl\owlpch.h>

#include <owl\applicat.h>

#include <owl\framewin.h>

#include <owl\vbxctl.h>

#include "awareowl.h"

#include "awclock.h"

//////////////////////////////////////////////////////////////////////

//The following class implements the Clock application's main window.

//

class TClockWnd : public TFrameWindow, public TVbxEventHandler

{

  protected :

    CAwareClock* pClock;

  public :

    TClockWnd();

    ~TClockWnd();

};

//////////////////////////////////////////////////////////////////////

TClockWnd::TClockWnd()

  : TFrameWindow(0, "Aware/VBX Clock")

{

  AssignMenu("MainMenu");

  pClock = new CAwareClock(this, IDC_CLOCK, "", 10, 10, 100, 40);

}

//////////////////////////////////////////////////////////////////////

TClockWnd::~TClockWnd()

{

  delete pClock;

}

//////////////////////////////////////////////////////////////////////

void TClockWnd::SetupWindow()

{

  TWindow::SetupWindow();

  pClock->SetAllowMoveHand(CLK_ALLOWMOVEHAND_LEFT_BUTTON);

  pClock->SetBorderStyle(CLK_BORDERSTYLE_NO_BORDER);

  pClock->SetClockStyle(CLK_CLOCKSTYLE_ANALOG);

}

Registering and Responding to Events

Event handling is not required when creating a control using Aware/VBX with OWL.  However, applications often need some event handling.  To handle events using OWL, add an entry to the parent windows response table, and implement the event handler.  OWL passes a pointer to a VBXEVENT structure to the event handler.  AWAREOWL.H defines macros to cast this pointer to extract each event parameter.

The Clock example implements an event handler for the Click event.

#include <owl\owlpch.h>

#include <owl\applicat.h>

#include <owl\framewin.h>

#include <owl\vbxctl.h>

#include "awareowl.h"

#include "awclock.h"

//////////////////////////////////////////////////////////////////////

//The following class implements the Clock application's main window.

//

class TClockWnd : public TFrameWindow, public TVbxEventHandler

{

  protected :

    CAwareClock* pClock;

  public :

    TClockWnd();

    ~TClockWnd();

  protected :

    virtual void SetupWindow();

    void EvSize(UINT sizeType, TSize& size);

    void EvClick(VBXEVENT far* event);

  DECLARE_RESPONSE_TABLE(TClockWnd);

};

//////////////////////////////////////////////////////////////////////

DEFINE_RESPONSE_TABLE2(TClockWnd, TFrameWindow, TVbxEventHandler)

  EV_WM_SIZE,

  EV_VBXEVENTNAME (IDC_CLOCK, "Click", EvClick),

END_RESPONSE_TABLE;

//////////////////////////////////////////////////////////////////////

void TClockWnd::EvClick(VBXEVENT far* event)

{

  int iButton = CLK_CLICK_BUTTON(event);

  ENUM enumAnalogTicks;

  if( iButton == 2 )  // if right button click

  {

    pClock->GetAnalogTicks(enumAnalogTicks);

    switch( enumAnalogTicks )

    {

      case CLK_ANALOGTICKS_NONE :

        pClock->SetAnalogTicks(CLK_ANALOGTICKS_HOUR);

        break;

      case CLK_ANALOGTICKS_HOUR :

        pClock->SetAnalogTicks(CLK_ANALOGTICKS_MINUTE);

        break;

      case CLK_ANALOGTICKS_MINUTE :

        pClock->SetAnalogTicks(CLK_ANALOGTICKS_BOTH);

        break;

      case CLK_ANALOGTICKS_BOTH :

        pClock->SetAnalogTicks(CLK_ANALOGTICKS_NONE);

        break;

    }

  }

}

//////////////////////////////////////////////////////////////////////

void TClockWnd::EvSize(UINT /*sizeType*/, TSize& size)

{

  pClock->MoveWindow(0, 0, size.cx, size.cy);

}

Adding an Aware/VBX Control to a Dialog

When using OWL, adding an Aware/VBX control to a dialog is no different than adding one to a window.

//////////////////////////////////////////////////////////////////////

//The following class implements the Clock application's about box.

//

class TAboutDlg : public TDialog

{

  protected :

    CAwareClock* pClock;

  public :

    TAboutDlg(TWindow* parent);

    ~TAboutDlg();

  protected :

    virtual void SetupWindow();

};

//////////////////////////////////////////////////////////////////////

TAboutDlg::TAboutDlg(TWindow* parent)

 : TDialog(parent, "AboutDialog")

{

  pClock = new CAwareClock(this, IDC_CLOCK);

}

//////////////////////////////////////////////////////////////////////

TAboutDlg::~TAboutDlg()

{

  delete pClock;

}

//////////////////////////////////////////////////////////////////////

void TAboutDlg::SetupWindow()

{

  TDialog::SetupWindow();

  pClock->SetAnalogTicks(CLK_ANALOGTICKS_HOUR);

pClock->SetClockStyle(CLK_CLOCKSTYLE_ANALOG);

}


Using FarPoints AWAREVBX.H

FarPoints C++ classes are designed to provide a better object-oriented interface to the Aware/VBX controls.  Each FarPoint C++ class replaces the Get/Set property pairs with a single method and overloads the operators.  The benefits of this approach include:

-     Ease of transition from Visual Basic prototypes to C++ applications, because C++ code closely resembles Visual Basic code.

-     Identical MFC and OWL code for accessing and setting properties.

-     The property methods can be used on either side of an expression (ie. fpLong1()++ replaces fpLong1.SetValue(fpLong1.GetValue()+1)).

Note:  When using FarPoint C++ classes in a project using non-FarPoint VBX controls, the code written to access and set the property values of FarPoint and other VBX controls will differ.

Methods 	The class definitions for each Aware/VBX control in AWAREVBX.H implements or overloads the following member functions and operators:

Data Type	Overloaded Operator	Example
Short	=(short)	Ctrl.ButtonMax() = 10;
	=(CShortProperty)	Ctrl.ButtonMax() = Ctrl. ButtonMin() + 100;
	+=	Ctrl. ButtonMax() += 5;
	-=	Ctrl. ButtonMax() -= 5;
	*=	Ctrl. ButtonMax() *= 5;
	/=	Ctrl. ButtonMax() /= 5;
	%=	Ctrl. ButtonMax() %= 50;
	^=	Ctrl. ButtonMax() ^= 5;
	&=	Ctrl. ButtonMax() &= 5;
	|=	Ctrl. ButtonMax() |= 5;
	<<=	Ctrl. ButtonMax() <<= 2;
	>>=	Ctrl. ButtonMax() >>= 2;
	++	++Ctrl. ButtonMax();
	--	--Ctrl. ButtonMax();
	short()	x = Ctrl. ButtonMax();
		x = Ctrl.ButtonMax() = Ctrl.ButtonMin();
Long	=(long)	Ctrl.MaxLen() = 10;
	= (CShortProperty)	Ctrl.MaxLen() = Ctrl. ButtonMax();
	= (CLongProperty)	Ctrl.MaxLen() = Ctrl2.MaxLen();
	+=	Ctrl.MaxLen() += 5;
	-=	Ctrl. MaxLen() -= 5;
	*=	Ctrl. MaxLen() *= 5;
	/=	Ctrl. MaxLen() /= 5;
	%=	Ctrl. MaxLen() %= 50;
	^=	Ctrl. MaxLen() ^= 5;
	&=	Ctrl. MaxLen() &= 5;
	|=	Ctrl. MaxLen() |= 5;
	<<=	Ctrl. MaxLen() <<= 2;
	>>=	Ctrl. MaxLen() >>= 2;
	++	++Ctrl. MaxLen();
	--	--Ctrl. MaxLen();
	long()	x = Ctrl. MaxLen();
		x = Ctrl.MaxLen() = Ctrl2.MaxLen();
Float	=(long)	Ctrl.FontSize() = 10;
	=(CShortProperty)	Ctrl.FontSize() = Ctrl2.FontSize();
	float()	size = Ctrl.FontSize();
Picture	=(HPIC)
	HPIC()
String	=(LPCSTR)	Ctrl.Text() = Hello;
	=(CHszProperty)	Ctrl.Text() = Ctrl2.Text();
	Cstring()	strcpy(s, Ctrl.Text());
Sample Code

The code extracts in this section are taken from clock applications written using Aware/VBX and AWAREVBX.H with OWL and MFC.  The Aware/VBX default installation installs the complete source for each application in the following directories:

\AWARE\SAMPLES\MFC\CLOCKVBX

Contains the sample code which demonstrates how to use the Aware/VBX controls and AWAREVBX.H with MFC.

\AWARE\SAMPLES\OWL\CLOCKVBX

Contains the sample code which demonstrates how to use the Aware/VBX controls and AWAREVBX.H with OWL.

Using AWAREVBX.H with MFC

In A Window

BOOL CClockWnd::Create()

{

  CRect rectClock(100, 100, 100, 100);

  CFrameWnd::Create(

    NULL, "Aware/VBX Clock", WS_OVERLAPPEDWINDOW,

    rectDefault, NULL, "MainMenu"

  );

  m_Clock.Create(NULL, rectClock, this, IDC_CLOCK);

  m_Clock.AllowMoveHand() = AW_ALLOWMOVEHAND_LEFT_BUTTON;

  m_Clock.BorderStyle() = AW_BORDERSTYLE_NO_BORDER;

  m_Clock.ClockStyle() = AW_CLOCKSTYLE_ANALOG;

  return TRUE;

}

In An Event

afx_msg void CClockWnd::OnClick(UINT, int, CWnd*, LPVOID lpParams)

{

  int iButton = AW_CLICK_BUTTON(lpParams);

  if( iButton == 2)  // if right button click

  {

    switch( m_Clock.AnalogTicks() )

    {

      case AW_ANALOGTICKS_NONE :

        m_Clock.AnalogTicks() = AW_ANALOGTICKS_HOUR;

        break;

      case AW_ANALOGTICKS_HOUR :

        m_Clock.AnalogTicks() = AW_ANALOGTICKS_MINUTE;

        break;

      case AW_ANALOGTICKS_MINUTE :

        m_Clock.AnalogTicks() = AW_ANALOGTICKS_BOTH;

        break;

      case AW_ANALOGTICKS_BOTH :

        m_Clock.AnalogTicks() = AW_ANALOGTICKS_NONE;

        break;

    }

  }

}

In A Dialog

BOOL CAboutDlg::OnInitDialog()

{

  CDialog::OnInitDialog();

  m_pClock->AnalogTicks() = AW_ANALOGTICKS_HOUR;

  m_pClock->ClockStyle() = AW_CLOCKSTYLE_ANALOG;

  return TRUE;

}

Using AWAREVBX.H with OWL

In A Window

void TClockWnd::SetupWindow()

{

  TWindow::SetupWindow();

  pClock->AllowMoveHand() = CLK_ALLOWMOVEHAND_LEFT_BUTTON;

  pClock->BorderStyle() = CLK_BORDERSTYLE_NO_BORDER;

  pClock->ClockStyle() = CLK_CLOCKSTYLE_ANALOG;

}

In An Event

void TClockWnd::EvClick(VBXEVENT far* event)

{

  int iButton = AW_CLICK_BUTTON(event);

  ENUM enumAnalogTicks;

  if( iButton == 2 )  // if right button click

  {

    enumAnalogTicks = pClock->AnalogTicks();

    switch( enumAnalogTicks )

    {

      case AW_ANALOGTICKS_NONE :

        pClock->AnalogTicks() = CLK_ANALOGTICKS_HOUR;

        break;

      case AW_ANALOGTICKS_HOUR :

        pClock->AnalogTicks() = CLK_ANALOGTICKS_MINUTE;

        break;

      case AW_ANALOGTICKS_MINUTE :

        pClock->AnalogTicks() = CLK_ANALOGTICKS_BOTH;

        break;

      case AW_ANALOGTICKS_BOTH :

        pClock->AnalogTicks() = CLK_ANALOGTICKS_NONE;

        break;

    }

  }

}

In A Dialog

void TAboutDlg::SetupWindow()

{

  TDialog::SetupWindow();

  pClock->AnalogTicks() = CLK_ANALOGTICKS_HOUR;

  pClock->ClockStyle() = CLK_CLOCKSTYLE_ANALOG;

}