JCL Help:SetDisplayResolution

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Changes the resolution of the screen.


Pascal

 function SetDisplayResolution(const XRes: DWORD; const YRes: DWORD): Longint;


Parameters

Parameters Description
const XRes: DWORD New Width of the screen, in pixels.
const YRes: DWORD New Height of the screen, in pixels.


Return Value

Internally the ChangeDisplaySettings function is used to obtain the result. The possible return values are:

Value Meaning
DISP_CHANGE_SUCCESSFUL The settings change was successful.
DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
DISP_CHANGE_BADPARAM An invalid parameter was passed in. This can include an invalid flag or combination of flags.
DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
DISP_CHANGE_BADMODE The graphics mode is not supported.
DISP_CHANGE_NOTUPDATED Windows NT/2000: Unable to write settings to the registry.


Description

Dynamically changes the resolution (width and height) of the visible device surface of the default display device. In simpler terms, changes the width and height of the screen. If the function succeeds the system automatically sends a WM_DISPLAYCHANGE message to all running applications.


About

Unit

JclMiscel


Donator

John C Molyneux


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page