Kbase P97504: Can Windows screen resolution be programmatically changed?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/03/2011 |
|
Status: Verified
GOAL:
Can Windows screen resolution be programmatically changed?
GOAL:
Can Windows display settings be accessed from 4GL?
GOAL:
Can Windows display settings be programmatically changed?
FACT(s) (Environment):
Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
Progress does not have native methods to access or change Microsoft Windows screen resolution or other settings at run time. However, the 4GL can be used to invoke the two Windows API function EnumDisplaySettings and ChangeDisplaySettings that are used to both access and change several display settings without having to reboot the system.
The actual implementation of these API calls is beyond the scope of Progress Technical Support. The main steps involved in implementing such a solution would be:
1. Use EnumDisplaySettings API to obtain information about the current display settings.
2. Use EnumDisplaySettings API to enumerate all supported display settings.
3. The DEVMODE structure contains all the information about a given display mode.
4. Use ChangeDisplaySettings to switch to a new display mode specified by a valid DEVMODE structure.