Meter Bar Custom Control
 Meter Bar  Control

Properties	Methods	Events

Description

The Meter Bar control simulates a gas gauge or progress indicator.  It allows you to "fill up" the control in any direction and at any rate.

File Name

MBAR.VBX

Remarks

The Meter Bar has a few custom properties that allow you to change the appearance of the control.  The rate at which you fill the control can be set at any number between 1 and 32767.  You do not have to worry about displaying the "percentage complete", the control will figure this out for you.

This Meter Bar control was designed for and tested with Visual Basic v3.0 and Windows v3.1.  It was written in Visual C++ v1.0.

Bound Properties

This control is not a bound control.

Distribution Note	When you create and distribute applications that use the Meter Bar control, you should install the file MBAR.VBX  in the customer's Microsoft Windows\SYSTEM sub directory.  The Setup Wizard included with Visual Basic provides tools to help you write setup programs that install your application correctly.

Copyright Note	This Meter Bar control for Visual Basic is public domain.  Visual Basic v3.0, Windows v3.1 and Visual C++ v1.0 are copyrights of Microsoft Corp.  Please feel free to send suggestions and comments to Scott Stubbs @ CompuServe ID 73474,313.


Properties

All of the properties for this control are listed in the following table.  Properties that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*).  For documentation of the remaining properties, see the Visual Basic manuals.

BackColor	ForeColor	Parent
*BorderStyle	Height	*Position
Enabled	HelpContextID	*Range
FontBold	hWnd	Tag
FontItalic	Index	Top
FontName	Left	Visible
FontSize	MousePointer	Width
FontStrike	Name
FontUnder	*Orientation

Position is the default value


Methods

All the methods for this control are listed in the following table.  For documentation of the following methods, see the Visual Basic manuals.

Move	ZOrder
Refresh


Events

All of the events for this control are listed in the following table.  Events that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*).  For documentation of the remaining events, see the Visual Basic manuals.

Click	DragOver	MouseUp
DblClick	MouseDown
DragDrop	MouseMove
Click is the default event


BorderStyle Property, Meter Bar Control

Description

Determines the border style for an object.

Syntax

[form.]MeterBar.BorderStyle[ = setting%]

Remarks

The following table lists the BorderStyle settings for the Meter Bar.

Setting	Description

0	None (no border or related border elements).

1	(Default) Fixed Single.  A single black line borders the meter bar control.

2	Three D.  A three dimensional border surrounds the meter bar control.

Data Type

Integer (Enumerated)


Orientation
Orientation Property, Meter Bar Control

Description

Sets the orientation or direction for "filling up" the control.

Syntax

[form.]MeterBar.Orientation[ = setting%]

Remarks

The following table lists the Orientation property settings for the Meter Bar.

Setting	Description

0	(Default) Fill control from left to right.

1	Fill control from right to left

2	Fill control from bottom to top

3	Fill control from top to bottom

Settings 0 and 2 are the most common and familiar in user interface guidelines.

Data Type

Integer (Enumerated)


Position
Position Property, Meter Bar Control

Description

Sets the amount to fill the control.

Syntax

[form.]MeterBar.Position[ = value%]

Remarks

The value of Position must be between 0 and the Range property.  Position can not exceed the Range value.  The "percentage complete" is automatically calculated for you.

Data Type

Integer


Range
Range Property, Meter Bar Control

Description

Sets the maximum value the Position property can be to "fill up" the control.

Syntax

[form.]MeterBar.Range[ = value%]

Remarks

The value of Range can not be less than 1 and can not exceed the integer maximum 32767.  Since you can specify a range greater than 100, the control calculates the "percentage complete" automatically for you.

Data Type

Integer