This control will allow you to use a
picture as the background of your control, centered or tiled, or a gradient. You will also
be able to make the form flash, remember its last size, position and state, stay on top,
clip the mouse over it, show a gradient as its title bar, resize its contents on change of
size or set the minimum or maximum height or width that the form will be able to have. The
control has also a special resize event that you can use to resize other controls included
in the form.
This control replaces and improves the AR OnTop, AR Flash and AR Background controls.
- 25.12.2000, version 1.14: A few
bugs corrected, and some things of the behaviour changed. Also added the
DontShowMaximizedAtStartup,
IniPosLeft, IniPosTop and
LoadWindowInScreen
properties.
- 28.02.1999, version 1.10: added the
RemoveCloseButton method.
- 17.11.1998, version 1.09: fixed a bug.
- 10.11.1998, version 1.08: fixed a bug.
- 05.11.1998, version 1.07: added the
possibility of making a gradient in the title bar of the application (thanks
to Asdrubal Velasquez). Added the capacity of
resizing controls contained in the form as the form changes of size (thanks to Andre Beneke). Also added the capacity of saving and
restoring form size and position from an INI file, rather than the registry, in case
different users log on a system using the same account.
- 06.08.1998: added a sample application that
shows how to use the Resize event in the control.
- 27.07.1998, version 1.04: added the ability
of remembering last form size, position and state.
- 10.07.1998, version 1.02: added the MouseClipped property.
- 26.06.1998, version 1.00 released.
- AppName: Type here the name of your
application. This property will be used to store in the registry the information about the
last position and state of the form, and is only necessary if you set to
True the RecordWindowPos property. The information will be saved under HKCU/Software/AppName/FormName.
- BackgroundType: None
(0), Gradient (1),
[Picture Centered] (2) or [Picture Tiled]
(3).
- DontShowMaximizedAtStartup:
if you set this property to True, the form will not be shown maximized even
if last time it was maximized when it was unloaded.
- Flash: True or
False, set it to True if
you want the form to flash.
- FlashRate: How many times per second you
want the form to flash.
- GradientEndColor: If BackgroundType is
Gradient, this color will be used as the ending color for the gradient shown in the background of
your form.
- GradientIniColor: If BackgroundType is
Gradient, this color will be used as the initial color for the gradient shown in the background of
your form.
- GradientOrientation: [Up
Down] (0), [Left Right] (1),
[Down Up] (2) or [Right
Left] (3). If BackgroundType is
Gradient, use this property to set
the orientation that you want the gradient in the background to have.
- GradientTitle: True or
False. Setting this
to True will make the control display a gradient in the title bar of the form. This could
give some problems in Windows NT, like changing the font used in the form.
- INIFile: Put here the full path to a file
in which information about the size and position of the form will be saved. If you set
this property at run-time (like in the Form_Load event), make sure that the
RecordWindowPos property is
True and that the RecordWindowPosTo is set to
[INI File] (1) before hand.
- IniPosLeft: Initial
left positition of the form if it's the first time it's shown and there is
previous information.
- IniPostTop: Initial
top positition of the form if it's the first time it's shown and there is
previous information.
- LoadWindowInScreen:
If last time the form was unloaded part of the form was not visible because
it was out of the limits of the screen, setting this property to
True will
make sure the form is completely visible next time the form is loaded.
- MaxHeight: Maximum height that you want
the form to have, given in twips. Set it to 0 if you want this property to be ignored.
- MaxWidth: Maximum width that you want the
form to have, given in twips. Set it to 0 if you want this property to be ignored.
- MinHeight: Minimum height that you want
the form to have, given in twips. Set it to 0 if you want this property to be ignored.
- MinWidth: Minimum width that you want the
form to have, given in twips. Set it to 0 if you want this property to be ignored.
- MouseClipped: When set to
True, the cursor
movement will be restricted to the area of the form. Additionally, the user will not be
able to resize or move the form in any case. This property can only be set
at run-time.
- OnTop: True or
False, set it to True if
you want the form to stay on top of all the other forms.
- Picture: This will be the pictured used in
the background if BackgroundType is set to
[Picture Centered] or
[Picture Tiled].
- RecordWindowPos: Set this property to
True
if you want the form to remember the last position and state of the form in which it is
placed. You will also have to set the AppName property. If the form was closed being in
minimized state, next time the form loads the control will put it in restored state, using
last size and position saved. I assume it is not practical loading a form in minimized
state (at least not in my programs), so if you need this because any strange reasons, you
will not be able to do it using this control. Note: Please, make sure
that the StartUpPosition property of the form is set to
Manual or to WindowsDefault.
- RecordWindowPosTo:
Registry (0) or [INI File] (1). This tells the control where the information about the form size and position
should be saved.
- ResizeContents: True or
False. When set to True, controls contained in the form will be resized the form changes of size. The system
used to do this is very simple, and doesn't support fonts.
- Refresh: This refreshes the background of
the form. You will have to use it if you change background options at run-time.
- RemoveCloseButton: This method disables
the close button of the form.
- Resize (WidthChange As Single, HeightChange As
Single): You
can use this event to resize other controls contained in the form. The special features of
this event are that it will provide you the vertical and horizontal changes (given in
twips) since the last time this event was fired, and that it will not be fired when the
form is minimized.
VERY IMPORTANT: If you
are going to use the background options of this control, set the
AutoRedraw
property of the form in which you place this control to
True.
Note: Please, read the FAQ section
about finishing a project that has this control with the End
statement.
|
(69 Kb) |
© Alvaro Redondo,
2000. All Rights Reserved.
http://www.sevillaonline.com/ActiveX/