home
|
support
|
shop
|
downloads
|
about devpower
DevPower Flat Button ActiveX Control Version 3.3.0 (18-Jan-99)
Copyright (c) 1998 - 2012 Steve Robbins All Rights Reserved.
Documentation
General Notes
Picture Types
The control can display bitmaps, icons, metafiles, JPEGs, and GIF files.
Picture Locations
The URLPicture property will accept file locations, such as
   
C:\Windows\SetUp.bmp
or URLs to files on a web server such as
   
http://www.devpower.com/transimg/example.bmp
Picture Sizes
To create buttons in the style of Internet Explorer 4, use images that are 25 pixels wide and 22 pixels high.
To create buttons in the style of Office 97, use images that are 19 pixels wide and 18 pixels high.
Properties
AlignCaption
Integer
Sets the position of the caption within the button;
0 Align Top.
1 Align Bottom.
2 Align Left.
3 Align Right.
4 Align Middle.
AlignPicture
Integer
Sets the position of the picture within the button;
0 Align Top.
1 Align Bottom.
2 Align Left.
3 Align Right.
4 Align Middle.
AutoSize
Boolean
Sets whether the control should automatically resize itself to fit around the image or caption it is to display.
BackColor
OleColor
Sets the background colour of the control.
BorderStyle
Integer
Sets whether the control has borders;
0 None - no border is displayed when the mouse is moved over the control.
1 FixedSingle - a border is displayed.
Caption
String
Sets the caption to display on the control. If a '&' symbol is included in the caption, the character following it will be the short cut key for the control.
Checked
Boolean
Sets whether the control is checked (only if the Style is Check).
DroppedDown
Boolean
(Read Only)
Gets whether the control is currently dropped down.
Enabled
Boolean
Sets whether the control is enabled.
Font
OleFont
Sets the font for the caption.
FontDirection
Integer
Sets the direction the font is displayed in (for TrueType fonts only).
0 Normal Text.
1 Downward Text.
2 Reverse Text.
3 Upward Text.
HighlightColor
OleColor
Sets the highlight colour of the control.
MaskColor
OleColor
Sets the colour to make transparent on the picture.
MouseIcon
OleObject
Sets the cursor to display when the mouse is over the control. (also see MouseIconURL)
MousePointer
Integer
Sets one of the standard windows cursors to be displayed when the mouse is over the control (as with Visual Basic Controls);
1 Arrow.
2 Cross (crosshair pointer).
3 I beam.
4 Icon (small square within a square).
5 Size (four-pointed arrow pointing north, south, east, and west).
6 Size NE SW (double arrow pointing northeast and southwest).
7 Size N S (double arrow pointing north and south).
8 Size NW SE (double arrow pointing northwest and southeast).
9 Size W E (double arrow pointing west and east).
10 Up Arrow.
11 Hourglass (wait).
12 No Drop.
13 Arrow and hourglass.
14 Arrow and question mark.
15 Size all.
99 Custom icon specified by the MouseIcon
Picture
OleObject
Sets the image to display when the mouse is not on the button (also see URL Picture).
PictureDown
OleObject
(optional)
Sets the image to display when the mouse held down on the button.
PictureDisabled
OleObject
(optional)
Sets the image to display when the control is disabled.
PictureOver
OleObject
(optional)
Sets the image to display when the mouse is over the button.
PlaySounds
Boolean
Whether to play sounds when the control is clicked or the user moves over / off the button.
ShadowColor
OleColor
Sets the shadow colour of the control.
SoundClick
Variant (Byte Array)
Gets / Sets the contents of the sound file downloaded through the SoundClickURL property so that sounds can be shared among buttons at run-time to save download time (also see PropertyDownloaded event).
SoundClickURL
String
The File Location / URL for the sound to play when the mouse clicks the button (if UseSystemSounds is False).
SoundEnter
Variant (Byte Array)
Gets / Sets the contents of the sound file downloaded through the SoundEnterURL property so that sounds can be shared among buttons at run-time to save download time (also see PropertyDownloaded event).
SoundEnterURL
String
The File Location / URL for the sound to play when the mouse moves over the button (if UseSystemSounds is False).
SoundLeave
Variant (Byte Array)
Gets / Sets the contents of the sound file downloaded through the SoundLeaveURL property so that sounds can be shared among buttons at run-time to save download time (also see PropertyDownloaded event).
SoundLeaveURL
String
The File Location / URL for the sound to play when the mouse leaves the button (if UseSystemSounds is False).
Style
Integer
Sets the control style;
0 Normal - a normal button
1 Check - a button that stays down when clicked (like a check box)
2 Separator - a toolbar separator that doesn't respond to user events - this can be used for creating a toolbar with the buttons.
3 DropDown - This allows a side drop down panel on the side of the button and operates like the Office 97 drop down toolbar buttons - e.g. Undo / Redo in Word.
4 DropDownNoSeparator - This drop down style operates like the folder selection button in Microsoft Oulook - the difference with the above style is that there is no separate drop down area, the whole button acts as the drop down selector.
5 Menu - This drop down style operates like the menus used in Office 97 / Windows 98.
6 MenuItem - Operates like the menu items used in Office 97 - these styles can be used for creating menus with the buttons
7 MenuItemCheck - As above but checkable.
8 MenuItemCascade - Menu Item that drops down to have sub menus.
9 MenuItemSeparator - a menu item separator that doesn't respond to user events.
10 NonFlat - Brings the unique features of Flat Button to a normal button.
TextColor
OleColor
Sets the caption colour.
ToolTipText
String
Sets the tool tip to display for the control.
Transparent
Boolean
Sets whether the background of the control is transparent - that is no background color and no rigid border around your image. This feature does not work with Icons and the button cannot have a caption, borders and AutoSize must be turned on.
URLMouseIcon
String
An alternative to the MouseIcon property - sets a File Location / URL for downloading an icon / cursor to display when the mouse moves over the button.
URLPicture
String
An alternative to the Picture property - sets a File Location / URL for downloading an image to display.
URLPictureDown
OleObject
(optional)
See PictureDown
URLPictureDisabled
OleObject
(optional)
See PictureDisabled
URLPictureOver
OleObject
(optional)
See PictureOver
UseSystemSounds
Boolean
Whether to the user defined sounds for menu command and menu pop-up (if PlaySounds is turned on).
Value
Boolean
Gets / Sets the value of the button. Setting to True at run time will raise the Click event (same functonality as Visual Basic buttons).
Methods
AboutBox
(
)
Displays copyright and version information for the control.
CancelDropDown
(
)
This method should be used to restore the button state after the user has selected an item or cancelled (by clicking away) your drop down menu / window.
Version
(
)
Returns the control version.
Events
Click
(
)
Triggered when the control has been clicked.
DropDown
(
)
Triggered when the user clicks the drop down area of the control.
DropDownCancelled
(
)
Triggered when the user clicks the button whilst it is in the drop down state - your drop down menu or window should then be hidden.
KeyPress
(
Integer KeyAscii
)
Triggered when the user presses a key while the button has focus.
MouseDown
(
Integer Button, Integer Shift, Single x, Single y
)
Triggered when a mouse button is pressed down on the control.
Button
parameter is a number between 1 and 3.
Shift
parameter is a number that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button was pressed or released;
Bit 0 (= 1) - SHIFT key
Bit 1 (= 2) - CTRL key
Bit 2 (= 4) - ALT key
x,y
parameters contain the current location of the mouse pointer within the control.
MouseMove
(
Integer Button, Integer Shift, Single x, Single y
)
Triggered when the mouse is moved over the control.
Parameters as MouseDown
.
MouseUp
(
Integer Button, Integer Shift, Single x, Single y
)
Triggered when a mouse button is released over the control.
Parameters as MouseDown
.
PropertyDownloaded
(
String sProperty
)
Triggered when one of the URL based properties has successfully downloaded a file. This event facilitates the sharing of sounds and images amongst controls meaning reduced download times.
RightClick
(
)
Triggered when the control has been right-clicked.
Resize
(
Long Width, Long Height
)
Triggered when the control resizes itself to fit a picture.