"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CChangeRes
Changing monitor screen resolutions This class supports functionality to list all available video modes and switch to the desired mode. Since some mode changes require a shutdown of Windows, this is also supported.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CChangeRes class
|
|
AllowReboot
|
Property
|
Sets whether or not the class offers the option to reboot Windows if a display mode change requires it.
Certain mode changes may require a reboot. For example, changing the color depth on some systems requires a reboot for the changes to take effect. If you set this property to True, the class will prompt for a reboot as needed. If this property is set to False, the class will not prompt for reboot, nor will it reboot.
|
|
ForceMode
|
Property
|
Sets whether or not the video mode is reset when the mode requested is the same as the current mode.
|
|
hDC
|
Property
|
Set the hDC of a form in the app. This is required to get the list of supported modes.
|
|
Mode
|
Property
|
Retrieve the video mode at the specified position in the collection. This property is only valid after calling the LoadModes method.
After calling the LoadModes method, the class Modes collection contains a 1-based list of available modes. Use the Mode property with a long integer index value to retrieve a specific mode.
|
|
ModeCount
|
Property
|
A 1-based count of available video modes. This property is only valid after calling the LoadModes method.
|
|
ChangeResolution
|
Method
|
Changes resolution to the selected value.
The lngSelMode argument corresponds to an available video mode. Since this property is 0-based and the Mode collection is one-based, subtract 1 from a Mode collection item to get the corresponding value to pass to this method.
|
|
Class_Initialize
|
Initialize
|
Code called when the class is instantiated.
|
|
IsNT
|
Private
|
Determines if the OS is Windows NT
|
|
LoadModes
|
Method
|
Loads the modes supported by the current display adapter into the class collection, along with strings describing the availbale modes
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|