home
|
support
|
shop
|
downloads
|
about devpower
DevPower Transparent Image ActiveX Control Version 2.9.1 (18-Jan-99)
Copyright (c) 1998 - 2008 Steve Robbins All Rights Reserved.
Documentation
General Notes
Picture Types
The TransImg 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://localhost/images/example.bmp
Picture Property
Important:
Because of incorrect property handling, the use of the Picture property is not recommended for use in PowerBuilder - use the URLPicture to specify a file location.
Properties
AutoSize
Boolean
Determines whether the control should automatically resize itself to the size of the bitmap it is to display.
BackColor
OLE_COLOR (Long)
Sets the background colour to display after the bitmap has been masked.
BorderStyle
Integer
Sets the controls border style;
0 (None) - Display no border (Default)
1 (FixedSingle) - Display a single pixel border around the control.
CheckColor
OLE_COLOR (Long)
Sets the check pattern colour (see DrawCheckPattern).
DrawCheckPattern
Boolean
Sets whether the background of the control has checks on - this is mainly for using this control for rendering buttons.
Enabled
Boolean
Sets whether the control responds to user actions or not.
FlipHoriz
Boolean
Sets whether the image is drawn mirrored horizontally.
FlipVert
Boolean
Sets whether the image is drawn mirrored vertically.
hDC
Long
Returns the Control Device Context Handle.
hWnd
Long
Returns the Control Handle.
MaskColor
OLE_COLOR (Long)
Sets the colour to mask the bitmap with.
MouseIcon
OleObject
Sets the cursor to display when the mouse is over the control.
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 bitmap / icon to display (also see URL Picture).
Stretch
Boolean
Sets whether the displayed image should be stretched to fill the size of the control.
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 or at the same time as the Stretch or DrawCheckPattern features.
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 URL for downloading a bitmap / icon to display.
Methods
AboutBox
(
)
Displays copyright and version information for the control.
Cls
(
)
Clears the image display.
PiSet
(
Long x, Long y, Long Colour
)
Sets a specific pixel to the specified RGB Colour.
Point
(
Long x, Long y
)
Returns the RGB Colour of a specific pixel.
Refresh
( )
Forces the control to redraw.
Version
(
) String
Returns the Control Version.
Events
Click
(
)
Triggered when the TransImg has been clicked.
DblClick
(
)
Triggered when the TransImg has been double clicked.
KeyDown
(
Integer KeyCode, Integer Shift
)
Triggered when the user holds a key down while the control has focus.
KeyUp
(
Integer KeyCode, Integer Shift
)
Triggered when the user releases a key down while the control has focus.
KeyPress
(
Integer KeyAscii
)
Triggered when the user presses a key while the control has focus.
MouseDown
(
Integer Button, Integer Shift, Float x, Float y
)
Triggered when a mouse button is pressed down on the TransImg.
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, Float x, Float y
)
Triggered when the mouse is moved over the control.
Parameters as MouseDown
.
MouseUp
(
Integer Button, Integer Shift, Float x, Float y
)
Triggered when a mouse button is released over the TransImg.
Parameters as MouseDown
.
Resize
(
Long Width, Long Height
)
Triggered when the control is resized (usually by the picture changing).
RightClick
(
)
Triggered when the TransImg has been right clicked.