PicShow
Family Components v2.62
|
Copyright©
Kambiz R. Khojasteh. All rights reserved.
Get future component updates from http://www.delphiarea.com.
Delphi
3 |
Delphi
4 |
Delphi
5 |
Delphi
6 |
DESCRIPTION
TPicShow is an
image slider control with 127 transactional effects in pure Delphi code. The
major characteristics of TPicShow are:
- Image transaction
can be controlled programmatically
- Image can
be stretched or centered in the client area of the control
- Control can
show a background image as centered, stretched, or tiled
- Transaction
process can use a separated thread
- New transactional
effects can be easily implemented and added to the control
- Can be compiled
as windowed or non-windowed control
TDBPicShow is
the data-aware version of TPicShow with ability to load bitmap or jpeg images
(natively) from a blob field.
IMPORTANT
NOTE:
TPicShow and TDBPicShow as default are windowed controls. If you want to use
them as non-windowed controls, you have to edit PicShow.pas and remove
the definition of WINCONTROL_PICSHOW compiler symbol. Of course, as
non-windowed control you may see some flickers during image transitions.
ACKNOWLEDGMENT
Special thanks
to:
KEY PROPERTIES
- AutoDisplay:
Boolean (TDBPicShow only)
Determines whether the control automatically displays
the contents of a graphic BLOB in the database control.
- AutoSize:
Boolean
If set to true, Automatically sizes the control to the size of the loaded
image if any is loaded.
- BgMode:
TBackgroundMode
TBackgroundMode
= (bmNone, bmTiled, bmStretched, bmCentered)
Determines how the control displays the background image on its client
area.
bmNone |
|
Ignores
the background image. |
bmTiled |
|
Fills
the client area of the control by the background image as tiled. |
bmStretched |
|
Fills
the client area of the control by stretching (or shrinking) the background
image. |
bmCentered |
|
Draws
the background image on the center of the control's client area. |
- BgPicture:
TPicture
Contains
the background image of the control.
- Busy:
Boolean (Read-only)
Determines whether the control is performing an
image transition.
- Center: Boolean
If set to true and control's client area is larger than the loaded image,
the image will be centered within the control's boundaries.
- Color:
TColor
Determines the background color of the control.
- DataField:
String (TDBPicShow only)
Specifies the field of dataset, which contains
the image data.
- DataSource:
TDataSource
(TDBPicShow only)
Links
the control to a dataset.
- Delay:
Word
Determines the amount of delay in milliseconds before
showing the next frame of the transition.
- Empty
: Boolean (Read-only)
Determines whether any image is loaded into the
control.
- Picture:
TPicture (Published in TPicShow only)
Contains the image that the next call to Execute will show it.
- Progress:
TPercent
TPercent = 0..100
Determines the current state of the running transition.
When Busy property is false, changing this property has no effect.
- Reverse:
Boolean
If set to true, automatic transactions plays in reverse.
- Stretch:
Boolean
If set to true, when the control's client area
is larger than the loaded image, the image it will be stretched (or shrinked)
to fit within the control's boundaries.
- StretchFine:
Boolean
Determines the behavior of the Stretch property.
If set to true, the image's aspect ratio remains unchanged.
- Step: Word
Determines the amount of change in Progress in automatic transition.
- Style:
TShowStyle
TShowStyle = 0..127
Specifies the index of the transition effect that
will be used. By setting this property to zero, an OnCustomDraw event
will be fired just before showing a new frame.
- StyleName:
String
Specifies
the name of the transition effect that will be used.
- Threaded:
Boolean
If set to true, the control use a separated thread for the transition
process.
- ThreadPriority:
TThreadPriority
TThreadPriority = (tpIdle, tpLowest, tpLower, tpNormal, tpHigher, tpHighest,
tpTimeCritical)
Determines the thread's scheduling priority relative
to other threads in the process.
KEY METHODS
- procedure
Execute
Initials the transition and if Manual property is set false, starts
it. If Manual property is set to true, after calling this method you
can change the value of Progress property.
- procedure
Clear
Clears the client area of the control. Notice that calling this method
does not clear the image loaded into Picture property.
- procedure
Stop
Stops the running transition.
KEY EVENTS
- OnAfterNewFrame:
TCustomDrawEvent
TCustomDrawEvent = procedure(Sender: TObject; Picture, Screen: TBitmap) of
object
This event is triggered just after creating a new
frame of the transition and before drawing it on the control's client area.
- OnBeforeNewFrame:
TCustomDrawEvent
TCustomDrawEvent
= procedure(Sender: TObject; Picture, Screen: TBitmap) of object
This event is triggered just before creating a
new frame of the transition.
- OnChange:
TNotifyEvent (TPicShow only)
Occurs when content of Picture property changed.
- OnComplete:
TNotifyEvent
Occurs just after ending the transition effect.
Calling Stop method does not fire this event.
- OnProgress:
TNotifyEvent
Occurs just after drawing a frame of the transition on the client area
of the control.
- OnCustomDraw:
TCustomDrawEvent
TCustomDrawEvent
= procedure(Sender: TObject; Picture, Screen: TBitmap) of object
If Style property set to 0, this event is
triggered when the control needs to create a new frame of the transition.
The Picture parameter is the original image and the Screen parameter is a
bitmap that you should update it.
- OnMouseEnter:
TNotifyEvent
Occurs when the mouse pointer moves over the control.
- OnMouseLeave:
TNotifyEvent
Occurs
when the mouse pointer moves off from over the control.
- OnAfterLoadPicture:
TNotifyEvent (TDBPicShow only)
Occurs
when a new picture is loaded into the control.
- OnBeforeLoadPicture:
TNotifyEvent (TDBPicShow only)
Occurs
when a new picture is being load into the control.
HISTORY
- 2.62 (December
29, 2001)
- Support for Delphi 6.0 Added.
- Now controls as default are windowed controls. To change them from windowed
control to non-windowed control, edit PicShow.pas and remove the definition
of WINCONTROL_PICSHOW compiler symbol.
- 2.61 (April
18, 2001)
- New property StyleName added. This property is as same as Style
property but uses name of the transition instead of its index (Thanks to Gray
Bond).
- 2.60 (February
21, 2001)
- Native JPEG support added to TDBPicShow (Thanks to Ken
Otto)
- OnAfterLoadPicture and OnBeforeLoadPicture added events added
to TDBPicShow (Thanks to Ken Otto)
- A memory leak bug fixed (Thanks to Ken
Otto)
- 2.50 (September
7, 2000)
- 5 new effects added; now 127 effects (Thanks to Elliott
Shevin for 4 of these effects).
- Component editor improved.
- 2.40 (June
16, 2000)
- TDBPicShow is data-aware version of TPicShow that added to this version
of the component set.
- 2.32 (June
14, 2000)
- Since to this version, TPicShow only was a windowed control. Now, TPicShow
can be a windowed or non-windowed control depending to definition of WINCONTROL_PICSHOW
compiler directive.
- 2.31 (June
12, 2000)
- OnBeforeNewFrame and OnAfterNewFrame events added.
- 2.30 (February
27, 2000)
- Memory leak bug fixed.
- 2.20 (February
6, 2000)
- Now, all styles can be played as reverse.
- Reverse property added.
- Now the value of Progress property can be manually decremented for
all styles.
- OnMouseEnter and OnMouseLeave events added
- the parameters of OnCustomDraw event changed.
- Some comments added to the source of demo application.
-
2.11 (February
1, 2000)
- A minor bug fixed.
- 2.10 (January
31, 2000)
- 5 new effects added; now 122 effects.
- Property editors placed in a separate unit (Delphi 5 consideration).
- Known bugs fixed.
- 2.00 (December
12, 1999)
- Manual animation control added (Thanks to Jerry
McLain for the idea).
- Now all styles, play the image with an equal speed.
- Stretch can keep the image aspect ratio.
- Delay, Manual, Progress, StretchFine, and ThreadPriority
properties added.
- OnCustomDraw and OnProgress events added.
- 1.50 (November
17, 1999)
- now Delphi 3.0 is supported.
- Icon support added.
- 1.40 (November
16, 1999)
- 8 new effects added; now 117 effects (Thanks to M.
R. Zamani for these effects).
- All reported bugs fixed.
- 1.30 (November
11, 1999)
- BgMode and BgPicture properties added.
- 32 new effects added; now 109 effects.
- Thread management improved.
- 1.20 (November
9, 1999)
- Empty property added.
- OnChange event added.
- Stop method added.
- 30 new effects added; now 77 effects.
- all known bugs fixed.
-
1.10 (November
6, 1999)
- Busy property added.
- Some bugs fixed.
- 1.00 (November
5, 1999)
-
Initial release with 47 effects.
LICENSE
PicShow family
components are freeware. You may copy component's files AS LONG AS YOU COPY
ALL OF THEM. If you want to change the source code in order to improve the
components' features, performance, etc. please send me the new source code
so that I can have a look at it. The changed source code should contain descriptions
what you have changed, and of course your name. The only thing you MAY NOT
CHANGE is the ORIGINAL COPYRIGHT INFORMATION.
DISCLAIMER
PicShow family
components are provided "AS IS" without any warranty of any kind,
either express or implied. The entire risk as to the quality and performance
of the software is with you. The author is NOT liable for any DAMAGES resulting
from the use and misuse of the components, especially he is NOT liable for
DAMAGES that were caused BY ANY VERSION WHICH HAS NOT BEEN PROGRAMMED BY THE
AUTHOR HIMSELF.