This button can replace the standard command button that comes with VB, or act as an active or borderless button. It supports text or different pictures depending on the state of the button.
This control replaces and improves the AR Flat Button Control
VERY IMPORTANT: From version 1.03, this control is not compatible with the previous versions. Therefore, you will have to recompile the projects in which you used the first version of the control (or just don't update the control for those projects you don't want to compile again). Sorry for all this mess-up.
- 26.06.2001, version 1.10.0005: added the [Show Border & Change Fore Color] option to the ShowFocus property.
- 13.03.2001, version 1.10.0002: fixed a minor bug about the behaviour of the control when it was disabled.
- 05.01.2001, version 1.10: corrected some things of the behaviour when ShowFocus was set to ChangeForeColor. Added the DontMoveContents property.
- 25.12.2000, version 1.09: a few bugs and behaviour corrected.
- 25.12.1998, version 1.06: added the PictureOn property.
- 17.11.1998, version 1.05: fixed a bug.
- 10.11.1998, version 1.04: fixed a couple of bugs.
- 03.11.1998, version 1.03: fixed a bug that made the picture not be shown properly when Style was [Graphic Button]. Added the BorderStyle property; from now on, the button can act as an active or borderless button. Removed the needing of having the license to use the control at design-time.
- 09.08.1998, version 1.02.0001: added the BackColorOnMouse property.
- 11.06.1998, version 1.02: Added some 'active' support: ForeColorOnMouse property and MouseEnter and MouseLeave events.
- 01.06.1998, version 1.01.0002: improved the behaviour of the control.
- 30.05.1998, version 1.01: added the arrow property, that you can use to show an arrow at the right part of the button. Also added graphics support.
- 13.05.1998, version 1.00 released.
- Alignment. Set here the horizontal alignment of the control: [Align Left] (0), [Align Right] (1) or [Align Center] (2).
- Arrow. Using this property you can show an arrow at the right part of the button. Its possible values are: [No Arrow] (0), [Arrow Right] (1) or [Arrow Down] (2).
- BackColor. Background color of the button.
- BackColorOnMouse. Background control that will be shown when the mouse is over the button.
- BorderColor. When the ShowFocus property is set to [Show Border], the color of the border shown will be the one set in this property.
- BorderStyle. [Normal], [Active Borders], [Borderless] or [None]. When set to [Normal], the button will act as a standard command button. It this property is set to [Active Borders] the button will act as an active button (it will popup when the mouse is over it). In [Borderless] mode the button will not show its border until it is pressed, and in [None] it will not show borders at all.
- Cancel. True or False; this will tell the button if it is the default Cancel button of the form, to triger the Escape key.
- Caption. Text that the button will show.
- Default. True or False; this will tell the button if it is the default button of the form, to triger the Enter key.
- DontMoveContents. When set to True, the contents of the button (text or graphic) will stay in the same place when the button is pressed or clicked.
- Enabled. True or False. Tells the button if it must work or not.
- Font. Font used for the caption of the control.
- ForeColor. Color used for the caption of the control.
- ForeColorOnFocus. When the ShowFocus property is set to [Change Fore Color], this color will be the one used to light the caption.
- ForeColorOnMouse. This color will be used for the text caption when the mouse is over the button. Ignored if Style is set to [Graphic Button].
- Picture. Picture that the button will show when its Style property is set to [Graphic Button].
- PictureDisabled. If the Style property of the button is set to [Graphic Button] and you set a graphic here, this graphic will be showed when the button is disabled.
- PictureDown. If the Style property of the button is set to [Graphic Button] and you set a graphic here, this graphic will be showed when the button is clicked.
- PictureOn. If the Style property of the button is set to [Graphic Button] and you set a graphic here, this graphic will be showed when the mouse is over the button.
- PressStyle. Dark (0) or Light (1), to tell the button how it should show its border when pressed and released.
- ShowFocus. [Don't Show Focus] (0), [Show Border] (1 and default), [Change Fore Color] (2) or [Show Border & Change Fore Color] (3). Use this property to tell the button how it has to show that it has the focus.
- Style: sets the style of the button, [Text Button] (0) or [Graphic Button] (1).
- VerticalAlignment. [Align Middle] (0), [Align Top] (1) or [Align Bottom] (2), to vertically align the caption or the picture in the button.
- Click ()
- GotFocus ()
- KeyDown (KeyCode As Integer, Shift As Integer)
- KeyPress (KeyAscii As Integer)
- KeyUp (KeyCode As Integer, Shift As Integer)
- LostFocus ()
- MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- MouseEnter (). This event is fired when the mouse is put over the button.
- MouseLeave (). This event is fired when the mouse leaves the button.
- MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Note: Please, read the FAQ section about finishing a project that has this control with the End statement.
|| (46 Kb)
© Alvaro Redondo, 2001. All Rights Reserved.