AR Form Extender ActiveX Control 1.09

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.

History:

  • 26.06.98, Version 1.0 released.
  • Version 1.02 10.07.98: added the MouseClipped property.
  • Version 1.04 27.07.98: added the ability of remembering last form size, position and state.
  • 06.08.98: added a sample application that shows how to use the Resize event in the control.
  • Version 1.07 05.11.98: 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.
  • Version 1.08 10.11.98: fixed a bug.
  • Version 1.09 17.11.98: fixed a bug.

Properties:

  • 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: 0 (None), 1 (Gradient), 2 (Picture Centered) or 3 (Picture Tiled).
  • 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 1, this color will be used as the ending color for the gradient shown in the background of your form.
  • GradientIniColor. If BackgroundType is 1, this color will be used as the initial color for the gradient shown in the background of your form.
  • GradientOrientation: 0 (Up Down), 1 (Left Right), 2 (Down Up) or 3 (Right Left). If BackgroundType is 1, 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 1 (INI File) before hand.
  • 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. For security, 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 2 or 3.
  • 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. 0 (Registry) or 1 (INI File). 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.

Methods:

  • Refresh. This refreshes the background of the form. You will have to use it if you change background options at run-time.

Events:

  • 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'.

 

(66 Kb)

 

© Alvaro Redondo, 1998. All Rights Reserved.
http://www.sevillaonline.com/ActiveX/