|
The image control is a lightweight
version of the picture box control
. Unlike the picture box control ,
the image control cannot act as a
container for other objects. It has
less properties than the picture box
and is not so versatile but if all
you want to do is to display an image
on a form then it is ideal . The image
control also uses less memory than
a picture box.
The image control can display Bitmaps
(.bmp) , icons (.ico) , Jpeg's (.JPG)
, Gif's (.GIF) and metafiles (.wmf).
Properties
| Appearance |
BorderStyle |
Container |
DataField |
| DataFormat |
DataMember |
DataSource |
DragIcon |
| DragMode |
Enabled |
Height |
Index |
| Left |
MouseIcon |
MousePointer |
Name |
| OLEDragMode |
OLEDropMode |
Parent |
Picture |
| Stretch |
Tag |
Top |
Visible |
| WhatsThisHelpID |
Width |
ToolTipText |
|
Not too many properties to worry
about here , but here is a quick rundown
of the most important ones in no particular
order.
Name : this is the name that
the programmer uses , the prefix is
img.
Picture : you add a
graphic by setting this property.
Stretch : when set to True
the picture resizes with the control
and when set to False the control
resizes to the size of the picture
inside it.
Height , Width : the
size of the control .
BorderStyle : the type of border
that surrounds the image , choose
from 0 - none (default) or 1 - fixed
single
Visible : determines whether
the object is visible or hidden
Appearance : this determines
whether or not an object is displayed
with 3d effects or not at run-time
Events
| Click |
DblClick |
DragDrop |
DragOver |
| MouseDown |
MouseMove |
MouseUp |
|
| OLEDragDrop |
OLEDragOver |
OLEGiveFeedback |
|
| OLEStartDrag |
OLESetData |
OLECompleteDrag |
|
The common events that you will use
will be the Click and DragDrop events
.
Methods
| Drag |
OLEDrag |
Move |
| ShowWhatsThis |
Zorder |
Refresh |
The methods that you may use could
be Move to physically move the Image
control to give a sense of simple
animation , Refresh to refresh the
image in the control .
|