   Help for LED

Properties	Events

Registration Information

Order Form

Getting Custom Controls Written

Description

LED is a Visual Basic custom control that behaves like an LED.  3-D effects and colors are all user definable.

File Name

LED2.VBX, LED16.OCX, LED32.OCX

Object Type

MabryLED

Compatibility

VB 2.0 and up

Distribution Note     When you develop and distribute an application that uses LED, you should install the file (LED2.VBX, LED16.OCX, or LED32.OCX) into the users Windows SYSTEM directory.  LED has version information built into it.  So, during installation, you should ensure that you are not overwriting a newer version of LED.


PerCnt Properties
LED Properties

Properties that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

*BevelInner Property

*BevelOuter Property

*BevelShapeInner Property

*BevelShapeOuter Property

*BevelWidthInner Property

*BevelWidthOuter Property

*BorderWidth Property

*DisabledColor Property

Enabled Property

Height Property

hWnd Property

Index Property

Left Property

Name Property

*OffColor Property

*OnColor Property

Parent Property

Tag Property

Top Property

*Value Property (default)

*Version Property

Visible Property

Width Property


PerCnt Properties
LED Events

Events that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

Click Event

DblClick Event

DragDrop Event

DragOver Event

MouseDown Event

MouseMove Event

MouseUp Event


BevelInner Property

See Also	Example

Description

Determines the 3-D style of the border immediately surrounding the LED area.

Usage

[form.][control.]BevelInner[ = integer ]

Remarks

The value of this property determines the style of the LED's border. This property may be one of five values:

Constant	Value	Description

msBevelNone	0	No frame

msBevelRaised	1	Raised frame (3-D)

msBevelInset	2	Inset frame (3-D)

msBevelLowered	3	Lowered frame (3-D)

msBevelSolid	4	Solid frame

Data Type

Integer (enumerated)


See Also

Properties:

BevelShapeInner

BevelOuter

BevelShapeOuter

BevelWidthInner

BevelWidthOuter

BorderWidth


BevelShapeInner Property

See Also

Description

Determines the shape of the 3-D style of the border immediately surrounding the LED area.

Usage

[form.][control.]BevelShapeInner[ = integer ]

Remarks

The value of this property determines the shape of the LED's border. If BevelShapeOuter is set to 1 (Ellipse), this property is automatically set to 1.

This property may be one of two values:

Constant	Value	Description

msShapeRectangle	0	Rectangle

msShapeEllipse	1	Ellipse

Data Type

Integer (enumerated)


See Also

Properties:

BevelInner

BevelOuter

BevelShapeOuter

BevelWidthInner

BevelWidthOuter

BorderWidth


BevelOuter Property

See Also	Example

Description

Determines the 3-D style of the border (if any) surrounding the control.

Usage

[form.][control.]BevelOuter[ = integer ]

Remarks

The value of this property determines the style of the control's border. This property may be one of four values:

Constant	Value	Description

msBevelNone	0	No frame

msBevelRaised	1	Raised frame (3-D)

msBevelInset	2	Inset frame (3-D)

msBevelLowered	3	Lowered frame (3-D)

msBevelSolid	4	Solid frame

Data Type

Integer (enumerated)


See Also

Properties:

BevelInner

BevelShapeInner

BevelShapeOuter

BevelWidthInner

BevelWidthOuter

BorderWidth


BevelShapeOuter Property

See Also

Description

Determines the shape of the 3-D style of the border surrounding the control.

Usage

[form.][control.]BevelShapeOuter[ = integer ]

Remarks

The value of this property determines the shape of the controls border. If BevelShapeInner is set to 0 (Rectangle), this property is automatically set to 0 as well.

This property may be one of two values:

Constant	Value	Description

msShapeRectangle	0	Rectangle

msShapeEllipse	1	Ellipse

Data Type

Integer (enumerated)


See Also

Properties:

BevelInner

BevelShapeInner

BevelOuter

BevelWidthInner

BevelWidthOuter

BorderWidth


BevelWidthInner and BevelWidthOuter Properties

See Also	Example

Description

Determines the width of the inner and outer borders (bevels).

Usage

[form.][control.]BevelWidth[ = integer ]

Remarks

The value of this property determines the width of the inner border (if any, see BevelInner) and the outer border (if any, see BevelOuter).  This is always measured in pixels.

Data Type

Integer


See Also

Properties:

BevelInner

BevelOuter

BorderWidth


BorderWidth Property

See Also	Example

Description

Determines the distance between the inner border and the outer border.

Usage

[form.][control.]BorderWidth[ = integer ]

Remarks

The value of this property determines the distance between the outer border (if any, see BevelOuter) and the inner border (if any, see BevelInner).  This is always measured in pixels.

Data Type

Integer


See Also

Properties:

BevelInner

BevelOuter


DisabledColor Property

See Also

Description

Sets the color of the LED when the control is disabled.

Usage

[form.][control.]DisabledColor[ = color ]

Remarks

This property determines what color the LED is when the control is disabled.

Data Type

Color


See Also

Properties:

OffColor

OnColor


OffColor Property

See Also

Description

Sets the color of the LED when the control is off.

Usage

[form.][control.]OffColor[ = color ]

Remarks

This property determines what color the LED is when the control is off (i.e., Value = False).

Data Type

Color


See Also

Properties:

DisabledColor

OnColor

Value


OnColor Property

See Also

Description

Sets the color of the LED when the control is disabled.

Usage

[form.][control.]OnColor[ = color ]

Remarks

This property determines what color the LED is when the control is on (i.e., Value = True).

Data Type

Color


See Also

Properties:

DisabledColor

OffColor

Value


Value Property

See Also	Example

Description

Turns the LED on or off.

Usage

[form.][control.]Value[ = boolean ]

Remarks

This property determines whether the LED is on or off.  If the control is disabled, the LED is painted using DisabledColor.  If Value is True, the LED is painted using OnColor.  And, if Value is False, the LED is painted using OffColor.

This property is the default value of the control.

Data Type

Integer (boolean)


See Also

Properties:

DisabledColor

OffColor

OnColor


Version Property

Description

Shows the version of the control.

Usage

[form.][control.]Version

Remarks

This property holds the current version of the control.  It is read-only and available at both design-time and run-time.

Data Type

String


Bevel Example

In this example, the program will change styles of the bevels used. To try this example, paste the code into the Declarations section of a form that contains two horizontal scroll bars (one for BevelInner, and one for BevelOuter), two labels (which show the properties), and an LED control.  Press F5.  Play with  the scroll bars to see things change.

Sub Form_Load ()

    Me.BackColor = RGB(192, 192, 192)

    HScroll1.Value = 0

    HScroll1.Min = 0

    HScroll1.Max = 3

    HScroll2.Value = 0

    HScroll2.Min = 0

    HScroll2.Max = 3

    Call HScroll1_Change

    Call HScroll2_Change

End Sub

Sub HScroll1_Change ()

    LED1.BevelInner = HScroll2.Value

    Label1.Caption = "BevelInner:" & Format$( HScroll1.Value )

End Sub

Sub HScroll1_Scroll ()

    Call HScroll1_Change

End Sub

Sub HScroll2_Change ()

    LED1.BevelOuter = HScroll3.Value

    Label2.Caption = "BevelOuter:" & Format$( HScroll2.Value )

End Sub

Sub HScroll2_Scroll ()

    Call HScroll2_Change

End Sub


Value Property Example

In this example, the program will show the percentage bar going up and down. To try this example, paste the code into the Declarations section of a form that contains a command button and an LED control.  Press F5.  Play with the button.

Sub Form_Load ()

    Me.BackColor = RGB( 192, 192, 192 )

    Command1.Caption = "Click Me"

End Sub

Sub Command1_Click ()

    LED1.Value = Not LED1.Value

End Sub


BevelWidth Property Example
Width Properties Example

In this example, the program will vary the width of bevels. To try this example, paste the code into the Declarations section of a form that contains three horizontal scroll bars, three labels, and an LED control.  Press F5.  Play with  the scroll bars to see things change.

Sub Form_Load ()

    HScroll1.Value = LED1.BevelWidthOuter

    HScroll1.Min = 0

    HScroll1.Max = 10

    HScroll2.Value = LED1.BevelWidthInner

    HScroll2.Min = 0

    HScroll2.Max = 10

    HScroll3.Value = LED1.BorderWidth

    HScroll3.Min = 0

    HScroll3.Max = 10

    Call HScroll1_Change

    Call HScroll2_Change

    Cakk HScroll3_Change

End Sub

Sub HScroll1_Change ()

    LED1.BevelWidthOuter = HScroll1.Value

    Label1.Caption = "BevelWidthOuter:" & Format$( HScroll1.Value )

End Sub

Sub HScroll1_Scroll ()

    Call HScroll1_Change

End Sub

Sub HScroll2_Change ()

    LED1.BevelWidthInner = HScroll3.Value

    Label2.Caption = "BevelWidthInner:" & Format$( HScroll2.Value )

End Sub

Sub HScroll2_Scroll ()

    Call HScroll2_Change

End Sub

Sub HScroll3_Change ()

    LED1.BorderWidth = HScroll3.Value

    Label3.Caption = "BorderWidth:" & Format$( HScroll3.Value )

End Sub

Sub HScroll3_Scroll ()

    Call HScroll3_Change

End Sub


Registration Information

Credits

LED was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or mabry@halcyon.com on Internet.  Our mailing address is:

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Registration

You can register this program by sending $15 ($20 for international orders) and your address.  You can register LED and its C source code by sending $35 ($40 for international orders).  With your order, you will receive a copy of our manual documenting our controls.

Add $5.00 per order for shipping and handling.

For your convenience, an order form has been provided that you can print out directly from this help file.

E-mail Discount

You may take a $5 discount for e-mail delivery of this package (CompuServe or Internet).  If you choose this option, please note: a printed manual is not included.  Be sure to include your full mailing address with your order.  Sometimes (on the Internet) the package cannot be e-mailed.  So, we are forced to send it through the normal mails.

CompuServe members may also take the $5 e-mail discount by registering this package in the software registration forum (GO SWREG).  LED's SWREG ID number is 3380.  The source code version's ID number is 3381.

Credit Card Orders

We accept VISA and Mastercard.  If you e-mail your order to us, please be sure to include your card number, expiration date, complete mailing address, and your phone number (in case we have any questions about your order).

© Copyright 1994-1995 by Mabry Software, Inc.


Order Form
 LED Order Form

Use the Print Topic.. command from the File menu to print this order form.

Mail this	Mabry Software, Inc.

form to:	Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com

Where did you get this copy of LED?

____________________________________________________________________

Ship to:	____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

Phone:	_________________________________________________________________

Fax:	_________________________________________________________________

E-Mail:	_________________________________________________________________

MC/VISA:	_________________________________________ exp. ___________________

qty ordered	____	REGISTRATION

$15 each ($20 international).  Check or money order in U.S. currency drawn on a U.S. bank.  Add $5.00 per order for shipping and handling.

qty ordered	____	SOURCE CODE AND REGISTRATION

$35 each ($40 international).  Check or money order in U.S. currency drawn on a U.S. bank.  Add $5.00 per order for shipping and handling.


Getting Custom Controls Written

If you or your organization would like to have custom controls written, you can contact me at the following:

James Shields

Mabry Software, Inc.

Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com

You can also contact Zane Thomas.  He can be reached at:

Zane Thomas

Post Office Box 300

Indianola, WA  98342

CompuServe: 72060,3327