by Vince Soto (2 Submissions)
Category: Graphics
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(2 Votes)

This project demonstrates how to change screen resolution (i.e. screen area in display settings) to any supported value on your machine.
Inputs
User sets screen resolution.
Assumes
There are some extra API calls which are not used in this project because it is going into something bigger which uses several other graphics capabilities, such as recreating TransparentBlt from msimg32.dll because of the memory leak in the function in win9x.
Code Returns
Sets screen resolution based on default refresh rate values for resolutions.
Side Effects
Note: This is a basic sample, and does not prompt the user to insure the resolution chosen is compatible with the monitor (or monitor driver) installed on the computer. If you are unsure about your display capabilities, do not set the resolution higher than what you are currently using!
API DeclarationsBitBlt SetBkColor CreateCompatibleDC DeleteDC CreateBitmap CreateCompatibleBitmap SelectObject DeleteObject GetObject ChangeDisplaySettings EnumDisplaySettings ExitWindowsEx GetDeviceCaps
and more