[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Windows resolution & application window size (ViP Specific) ====
=== At 13 APR 1998 01:22:27PM Didier B. wrote: ===
{{tag>"ViP Specific"}}
I have to deploy an application designed in 800 X 600 with ViP 2.5 on different machines. Some of these run in low resolution i.e 640 X 480 and the users are not used to change display settings in Windows. Making them shift to higher resolution permanently is not an option(stubborn users !).
Is there a way to make a ViP application change the Windows 95 screen resolution from 640x480 to 800x600 when launching the app and restore it back to normal on exiting the app?(This should be done without rebooting, like Quickres does.)
Is it possible for a ViP app to know in what screen resolution is Windows currently running?In the windows registry, the key HKEY_CURRENT_CONFIG\Display\Settings stores the screen resolution information. How can ViP read this value?
Can ViP write to this registry key?
Any help would be appreciated.
----
=== At 13 APR 1998 04:43PM Stephen Bellefontaine Revelation wrote: ===
Hello Didier,
Take a look at 'Working with the Windows 95 Registry' in the Knowledge Base ... "The Windows '95 and NT Registry can be a powerful tool for use in ViP applications. As a compact database designed for storing information about the system, user and applications on a particular machine, the Registry can be used by ViP applications to retrieve or even store those pieces of information... "
It refrences VipReg.lss which is provided on the ViP/DX 2.5 CD.
An alternative would be to use the native 32-bit API calls directly RegConnectRegistry - Opens a key on a remote system
RegCreateKey, RegCreateKeyEx - Creates a new key
RegDeleteKey - Deletes a key
RegDeleteValue - Deletes a valuefrom VIP ...
Registry Functions
RegCloseKey - Closes an open key
RegEnumKey, RegEnumKeyEx - Enumerates the subkeys of a given key
RegEnumValue - Enumerates the values for a key
RegFlushKey - Ensures that changes to a key have been written to disk
RegGetKeySecurity - Obtains the security information for a key
RegLoadKey - Loads registry information that had been saved to a file
RegNotifyChangeKeyValue - Allows your application to be notified when a key?s value or other information changes
RegOpenKey, RegOpenKeyEx - Opens a key
RegQueryInfoKey - Obtains information about a key
RegQueryValue, RegQueryValueEx Retrieves value data
RegReplaceKey - Replaces registry information with information that had been saved to a file
RegRestoreKey - Restores registry information from information that had been saved to a file
RegSaveKey - Saves registry information to a file
RegSetKeySecurity - Sets the security for a key
RegSetValue, RegSetValueEx - Sets a value for a key
RegUnLoadKey - Disconnects an open registry key on a remote system
Hope this Helps,
ViP/DX Support
----
=== At 14 APR 1998 02:58PM John Averell Revelation wrote: ===
It is pretty risky to try to change your video resolution dynamically within a program, particularly making it higher. Any crash will not restore the original condition, and there may be some serious hardware incompatibilities.
If this is really a problem, you should develop for the lowest credible resolution for your users (i.e. paying customers).
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=474E9A610769292D852565E5005F7072|View this thread on the forum...]]