Normal Topic Apperance of a for at different screen resolutions (Read 18016 times)
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Apperance of a for at different screen resolutions
Dec 7th, 2004 at 5:43am
Print Post Print Post  
Is there anyway to adjust the the apperance of a form with varying screen resolutions.

Example - a form I have designed takes up the full screen when displayed on a CRT screen with a resolution of 1024 X 768

But only 3/4 of the width of screen when displayed on an LCD screen with a resolution of 1280 X 1024.

Does anybody know how to make the form display full screen at both resolutions?


Many thanks in advance
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Apperance of a for at different screen resolut
Reply #1 - Dec 7th, 2004 at 8:15am
Print Post Print Post  
You may need a utility to switch to 1024 X 768  when starting  Sesame session, and back to 1280 x 1024 when closing.  Here is a possible approach:

This might be able to be done by starting Sesame with a two batch files that use the utility.  Part of closing Sesame would include updating a file somewhere to let the original batch file know it should change back to 1280 X 1024.

================
Contents of Sesame.bat to run Sesame: Quote:
If exist c:\sesame\close.txt del c:\sesame\close.txt
"ResUtility to 1024"
C:\Sesame\Programs\sesame.exe myfile.db
c:\sesame\Res1280.bat

To close Sesame:  Make a button on a form to close the application.  SBASIC Code behind the button will create c:\sesame\close.txt, and then call a macro to quit Sesame.

Contents of Res1280.batto restore resolution: Quote:
If exist c:\sesame\close.txt "ResUtility to 1280"
%0

===================
Sesame.bat file removes any previous close.txt file.  changes resolution to 1024, starts Sesame, and calls Res1280.bat.

Res1280.bat will keep looping until the close.txt file exists.
When the file exists, the Utilty changes resoluton back to 1280.

===================
The sample above uses 2 batch files in case the batch file lines are run immediately.  This could be a resource drain because Res1280.bat would be running continuously.

If each line in the batch file waits for previous execution to be completed (Sesame closes), then you can just replace the last line of Sesame.bat with: "ResUtility to 1280"  and eliminate the second batch file.


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
beagle
Junior Member
**
Offline


No personal text

Posts: 80
Location: australia
Joined: May 28th, 2004
Re: Apperance of a for at different screen resolut
Reply #2 - Dec 7th, 2004 at 9:58pm
Print Post Print Post  
Hi Bob,

Thanks very much for your answer - much appreciated
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Apperance of a for at different screen resolut
Reply #3 - Dec 8th, 2004 at 1:01am
Print Post Print Post  
You can download QRes 1.1 which is a FREE, Command Line utility to change resolutions.
=====================
QRES [/X:[px]] [/Y:[px]] [/C:[bits] [/R:[rr]] [/S] [/L] [/D] [/V] [/?] [/H]

/X    Width in pixels.
/Y    Height in pixels.
/C    Color depth.
       4 = 16 colors.
       8 = 256 colors.
       16= High color.
       24= True color.
       32= True color.
/R    Refresh rate.
       0 = Adapter Default.
       -1= Optimal.
/S    Show current display settings.
/L    List all display modes.
/D    Does NOT save display settings in the registry..
/V    Does NOT display version information.
/?    Displays usage information.
/H    Displays more help.

Ex: "QRes.exe /x:640 /c:8" Changes resolution to 640 x 480 and the color depth to 256 colors.

======================
Command line Examples:

qres.exe /x:640        Changes resolution to 640 x 480.
qres.exe /x 1280 /y 1024       Changes resolution to 1280 x 1024. (If your graphics card supports it)
qres.exe /c:8        Changes color resolution to 256 colors.
qres.exe /c:16       Changes color resolution to high color (16 bit).
qres.exe /c:24       Changes color resolution to true color (24 bit).**
qres.exe /r:0        Changes the refresh rate to Adapter Default.*
qres.exe /r:-1       Changes the refresh rate to Optimal.*
qres.exe /r:80       Changes the refresh rate to 80 Hz.

  * Windows 95 / 98 / Me only.
** On Windows XP you must use 32 bit.
=================================
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Apperance of a for at different screen resolut
Reply #4 - Dec 19th, 2004 at 5:54am
Print Post Print Post  
Hi Beagle......

I just ran across this utility.  May be easier to use.  Have not tried it out.....

http://dana.ucc.nau.edu/~tsr22/apps/#reso
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
putermann
Member
*
Offline


No personal text

Posts: 15
Joined: Jan 19th, 2005
Re: Apperance of a for at different screen resolut
Reply #5 - Jan 21st, 2005 at 9:31am
Print Post Print Post  
Bob;
Just came across this topic. It's something I've been wondering about.

Question - Do you know of a way to deal with this situation when you don't know what the native resolution will be on the system the app will be run on? (By deal with, I mean to be able to return to the original res)

Gene.
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Apperance of a for at different screen resolut
Reply #6 - Jan 21st, 2005 at 3:38pm
Print Post Print Post  
QRES may have the solution with the /d switch.

Code
Select All
qres.exe /x 1280 /y 1024  /d  

Changes resolution to 1280 x 1024 and does not save the settings to the registry.

If that does not work then you may have to get the current value and then reset it.  The QRes 1.1 command with the /s switch will show the current resolution.  So you could possibly do this:
 
1.  Run QRES /s and redirect it to a text file.
2.You can parse the file to get the setting you want to restore to.
3.  Run QRES to make the resolution that you want for Sesame.
4.  Run Sesame
5.  Run QRES to reset to the initial value that was parsed out.
--------------------
The steps above are untested, but seem logical to me.  But I would try using  /d first.



  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Apperance of a for at different screen resolut
Reply #7 - Jan 21st, 2005 at 4:09pm
Print Post Print Post  
Speaking as a user here, while you can find ways to force a particular resolution, you may want to reconsider doing so.

It's generally considered to be very bad behavior. Video games sometimes take over the screen and force a resolution, but you see them coming and they have reason to believe that you won't be doing anything else while playing the game.

If you force screen resolution for Sesame, you also force it for every other program the user is using. If I set my resolution to 1024 x 768, it's because that's the resolution I want. Not only do I personally run at 1600 x 1200, I also run in Pivot (portrait) mode. If you come along and change it because you've decided that 800 x 600 landscape is better, I'm going to be quite irked.

In addition, depending on the age and setup of the system, changing resolution can do fun things like force a reboot. Picking an unsupported resolution and/or refresh rate can disable the system and even damage the monitor itself. If you reset the resolution and the system loses power or goes down for any reason, you lose the opportunity to restore the settings.

The resolution is one of those things where the user has selected the one that works best for them based on how well they see, how many windows they like on screen at the same time, etc. Substituting your preferences for the user's, in this case, is something that shoudn't be done lightly.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged