Contents

 The ctMeter object is a visual representation of a progress meter.

The control can be set up in either a vertical or horizontal manner. Its range is defined by the programmer and range from -32768 - 32767 ( a short integer ). If text is to be displayed within the control, it will always be an integer value between 0 and 100.

File Names

16 bit	CTMETR16.OCX

32 bit	CTMETR32.OCX

Class Name

ctMeter

See Also :

Events

Properties

   ctMeter © 1996 Gamesman Inc. The ctMeter OCX is part of the Component Toolbox OCX


Properties

ctMeter Property	Data Type	Description
BackColor	long	Specifies the background color of the control.
BorderColor	long	Specifies the border color of the control.
BorderType	integer (enumerated)	Specifies the type of border to place around the control. Valid values include ... •    0 - Regular •    1 - None •    2 - Raised •    3 - Lowered •    4 - Drop Shadow •    5 - Drop Shadow
DisplayText	boolean	Specifies whether or not the percentage text will be displayed in the control.
Font	Font	Specifies the font used for all text within the control.
MaxValue	integer	Specifies the maximum value of the meter.
MeterStyle	integer (enumerated)	Specifies the orientation of the control. Valid values include ... •    0 - Horizontal •    1 - Vertical
MinValue	integer	Specifies the minimum value of the meter.
ShadowColor	long	Specifies the color of the shadow border (drop shadow border type only )
Value	integer	Specifies the current value of the control, and the current position of the progress bar.


Events

ctMeter Event	Occurs
MouseDown	Standard Event
MouseMove	Standard Event
MouseUp	Standard Event


BackColor
BackColor Property

Description

Determines the background color of the control. If a bitmap is used for the background, it will override this attribute.

Syntax

[form.]ctMeter.BackColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctMeter.BackColor = RGB( 128, 128, 128 )


BorderColor
BorderColor Property

Description

Specifies the color of the border painted around the control.

Syntax

[form.]ctMeter.BorderColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctMeter.BorderColor = RGB( 128, 128, 128 )


BorderType
BorderType Property

Description

The type of border to place around the control. Valid values include ...

•	 0 - Regular	: Regular border

•   	1 - None	: No border

•   	2 - Raised	: Raised 3D border

•   	3 - Lowered	: Lowered 3D border

•   	4 - Drop Shadow	: Regular border with a shadow

•   	5 - Inset     	: Inset border

Syntax

[form.]ctMeter.BorderType [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctMeter.BorderType = 2


DisplayText
DisplayText Property

Description

Specifies whether or not the percentage text will be displayed in the control.

Syntax

[form.]ctMeter.DisplayText [ = { True | False } ]

Data Type

Boolean

Example

ctMeter.DisplayText = TRUE


Font
Font Property

Description

Specifies the font used for all text within the control.

In order to set the font of the control, it must be either set using the font property page of the control, the property table of the host language ( if available ), or by assigning a font from another control with the same font type to this one.

Syntax

[form.]ctMeter.Font [ = Font ]

Data Type

Font

Example

ctMeter.Font = lbl_Text.Font


MaxValue
MaxValue Property

Description

Specifies the maximum value of the meter.

Syntax

[form.]ctMeter.MaxValue [ = setting% ]

Data Type

Integer

Example

ctMeter.MaxValue = 100


MeterStyle
MeterStyle Property

Description

Specifies the orientation of the control. Valid values include ...

•    0 - Horizontal

•    1 - Vertical

Syntax

[form.]ctMeter.MeterStyle [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctMeter.MeterStyle = 1


MinValue
MinValue Property

Description

Specifies the minimum value of the meter.

Syntax

[form.]ctMeter.MinValue [ = setting% ]

Data Type

Integer

Example

ctMeter.MinValue = 0


ShadowColor
ShadowColor Property

Description

Determines the color of the shadow in a drop shadow border. This color is only used if the BorderType is set to 4 (Drop Shadow)

Syntax

[form.]ctMeter.ShadowColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctMeter.ShadowColor = RGB( 128, 128, 128 )


Value
Value Property

Description

Specifies the current value of the control, and the current position of the progress bar.

Syntax

[form.]ctMeter.Value [ = setting% ]

Data Type

Integer

Example

ctMeter.Value = 50