TScreenRes: tiny component to change dynamiclly the screen resolution

For usage see the little examle program.


This is my first component, so if you find any error or improvement 
or comment send me an email:  harke@sds-hagen.de

Freeware for non-commercial use. (commercial please contact)

Free to change but send me your changes (i'll send you my last version)

I will try to insert more comfort into the component in the next months.

:=)  Guenter Harke


Description (copy of my comment in the source)

{***************************************************************************
 *  Component  TScreenRes  : Change the resolution of the graphic card     *
 *             Version     : 1.0                                           *
 *             Copyright   : SDS Software-Entwicklung und                  *
 *                           Digitale Systeme GmbH                         *
 *                           58089 Hagen, Germany                          *
 *                           email: harke@sds-hagen.de                     *
 *                                                                         *
 *             Installation: like any other component: link ScreenRes.dcu  *
 *                           into a package.                               *
 *                                                                         *
 *             Freeware    : free to use for non-commercial use            *
 *                           (other please contact)                        *
 *                                                                         *
 * property Modus          : set this property to change the screen modus  *
 *                           (see example)                                 *
 * property DesiredWidth   : the screen width you want optimal             *
 * property DesiredHeight  : the screen height you want optimal            *
 * property DesiredBitsPerPixel: colors in bits per pixel                  *
 * property FormatStr      : How the string with the parameters            *
 *                           is written to the Stringlist exported by the  *
 *                           function ReadModi                             *
 *                           default: '%dx%d with %g colors and %d Hz'     *
 *                           the for variables are width, height, colors   *
 *                           and refresh                                   *
 *                           To change this output search for the comment  *
 *                           starting with IMPORTANT                       *
 * property Change         : Three choices                                 *
 *                              Permanent: Makes changes permanent         *
 *                              Temporary: Makes changes until next reboot *
 *                              Test     : Only tests the choosen modus    *
 * property ChangeError    : Event if there is an error during changing the*
 *                           modus. Test the Result variable. (see example)*
 * property RestoreError   : Event if there is an error during restoring   *
 *                           the modus. Test the Result variable. (see ex.)*
 * property NoOptimalError : Event if the optimal modus given in DesiredX, *
 *                           DesiredY, DesiredC is not avaible             *
 * property OptimalError   : Event if there is an error in the procedure   *
 *                           SetoptimalModus                               *
 * property RestartError   : Event if you have to restart the computer to  *
 *                           change the modus (you can yus ExitWindows to  *
 *                           do this restart                               *
 * property BeforeChange   : Event before changing the modus               *
 * property AfterChange    : Event after changing the modus                *
 * function ReadModi: TStringList                                          *
 *                         : writes the avaible screen modi into a         *
 *                           TStringList with the Format FormatStr         *
 * procedure SetModus(m: Byte) : Set the modus with the number m           *
 * procedure SetOptimalModus : Set the optimal modus                       *
 * procedure RestoreModus  : Restores the last saved modus (set when you   *
 *                           call ReadModi.                                *
 * procedure ExitWindows   : Restart Windows to change the modus           *
 *                                                                         *
 ***************************************************************************}


History

Version 1.0 (20.10.98):
- First publication of ScreenRes
- minor bug fixes
- ExitWindows added
- Test on computers with very different hardware

Version 0.8 (13.10.98):
- some bug fixes
- OnOptimalError added
- OnRestartError added
- SetOptimalModus added

Version 0.1 (10.10.98):
- first try