473,381 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,381 software developers and data experts.

How to Change Display Screen Resolution? (800x600)

How to Change Screen Resolution ?
Jun 10 '07 #1
9 25160
bartonc
6,596 Expert 4TB
How to Change Screen Resolution ?
The maximum screen resolution depends on your hardware.
A program may be run in DOS mode. That may be what you are looking for.
Please tell us more about your system and what you are trying to do.

Thanks for joining.
Jun 10 '07 #2
Win/Mac/Linux Change Display Screen Resolution Settings = 800x600
Jun 10 '07 #3
epots9
1,351 Expert 1GB
to change the resolution of your desktop click:
Start->Control Panel->Display->Settings (tab)

then change the resolution there
Jun 10 '07 #4
bartonc
6,596 Expert 4TB
Win/Mac/Linux Change Display Screen Resolution Settings = 800x600
This was moved from the Python forum because it looked like a window question.
I'll move it back if you are trying to control the screen resolution from python. But you must be clear about what you are trying to do and what you have done so far in this regard.
Jun 10 '07 #5
I am sorry..i couldn't explain.
My English is not good..
How to change the desktop resolution via python?
Ex:
Expand|Select|Wrap|Line Numbers
  1. import os
  2. sistem=os.name
  3. if sistem=="nt"
  4.     #Change screen resolution for windows
  5.       ChangeResolution = 800x600
  6. elif sistem=="posix":
  7.     #Change screen resolution for unix-linux
  8.       ChangeResolution = 800x600
  9. ....
  10. ....
  11. else:
  12.     #Change screen resolution for mac 
  13.       ChangeResolution = 800x600
  14.  
vs..
Thanks..
Jun 10 '07 #6
bartonc
6,596 Expert 4TB
I am sorry..i couldn't explain.
My English is not good..
How to change the desktop resolution via python?
Ex:
Expand|Select|Wrap|Line Numbers
  1. import os
  2. sistem=os.name
  3. if sistem=="nt"
  4.     #Change screen resolution for windows
  5.       ChangeResolution = 800x600
  6. elif sistem=="posix":
  7.     #Change screen resolution for unix-linux
  8.       ChangeResolution = 800x600
  9. ....
  10. ....
  11. else:
  12.     #Change screen resolution for mac 
  13.       ChangeResolution = 800x600
  14.  
vs..
Thanks..
On Windows:
Do a google search for "Programmatically change display resolution".
Get that package working from the command line.
Then Python will be able to:
Expand|Select|Wrap|Line Numbers
  1. os.system("chscrres 800 600")
Although, I don't think is't a good idea for a program to change the screen resolution.
Jun 10 '07 #7
:(
ok.
Google>> http://mail.python.org/pipermail/tut...er/051106.html
Ex:
Expand|Select|Wrap|Line Numbers
  1. import os, sys
  2.  
  3. import win32api
  4. import win32con
  5. import pywintypes
  6.  
  7. display_modes = {}
  8. n = 0
  9. while True:
  10.   try:
  11.     devmode = win32api.EnumDisplaySettings (None, n)
  12.   except pywintypes.error:
  13.     break
  14.   else:
  15.     key = (
  16.       devmode.BitsPerPel, 
  17.       devmode.PelsWidth, 
  18.       devmode.PelsHeight, 
  19.       devmode.DisplayFrequency
  20.     )
  21.     display_modes[key] = devmode
  22.     n += 1
  23.  
  24. mode_required = (32, 1600, 1280, 70)
  25. devmode = display_modes[mode_required]
  26. win32api.ChangeDisplaySettings (devmode, 0)
  27.  
  28. #
  29. # ... time passes
  30. #
  31.  
  32. mode_required = (32, 1280, 1024, 70)
  33. devmode = display_modes[mode_required]
  34. win32api.ChangeDisplaySettings (devmode, 0)
  35.  
Error:
"exceptions.keyError:(32, 1600, 1280, 70)"
Jun 11 '07 #8
bartonc
6,596 Expert 4TB
:(
ok.
Google>> http://mail.python.org/pipermail/tut...er/051106.html
Ex:
Expand|Select|Wrap|Line Numbers
  1. import os, sys
  2.  
  3. import win32api
  4. import win32con
  5. import pywintypes
  6.  
  7. display_modes = {}
  8. n = 0
  9. while True:
  10.   try:
  11.     devmode = win32api.EnumDisplaySettings (None, n)
  12.   except pywintypes.error:
  13.     break
  14.   else:
  15.     key = (
  16.       devmode.BitsPerPel, 
  17.       devmode.PelsWidth, 
  18.       devmode.PelsHeight, 
  19.       devmode.DisplayFrequency
  20.     )
  21.     display_modes[key] = devmode
  22.     n += 1
  23.  
  24. mode_required = (32, 1600, 1280, 70)
  25. devmode = display_modes[mode_required]
  26. win32api.ChangeDisplaySettings (devmode, 0)
  27.  
  28. #
  29. # ... time passes
  30. #
  31.  
  32. mode_required = (32, 1280, 1024, 70)
  33. devmode = display_modes[mode_required]
  34. win32api.ChangeDisplaySettings (devmode, 0)
  35.  
Error:
"exceptions.keyError:(32, 1600, 1280, 70)"
Expand|Select|Wrap|Line Numbers
  1. n = 0
  2. while True:
  3.   try:
  4.     devmode = win32api.EnumDisplaySettings (None, n)
  5.   except pywintypes.error:
  6.     break
  7.   else:
  8.     key = (
  9.       devmode.BitsPerPel, 
  10.       devmode.PelsWidth, 
  11.       devmode.PelsHeight, 
  12.       devmode.DisplayFrequency
  13.     )
  14.     display_modes[key] = devmode
  15.     n += 1
You now have a dictionary [display_modes], keyed on the
height, width and depth needed.
You'll want to print the dictionary to see what modes that your system is actually capable of:
Expand|Select|Wrap|Line Numbers
  1. for item in display_modes.items():
  2.     print item
Jun 11 '07 #9
Motoma
3,237 Expert 2GB
How to Change Screen Resolution ?
It seems there is a small amount of ambiguity in what you are try to accomplish. Perhaps you could be more thorough in explaining what you want to do (not just change screen resolution, try insteas change screen resolution for a game, change default desktop resolution for....etc)
Jun 12 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
4
by: pjac | last post by:
I need some help with some VB language that will change the screen resolution on a monitor when a MS-Access 2000 database is opened from 1024 x 768 to 800 x 600. Any help with this effort would be...
8
by: lauren quantrell | last post by:
Is there a way to force a change in a user's screen resolution using VBA code without having any input from the user? Example: User John Backwards has his screen set to 800 x 600 pixels. Backwards...
1
by: Bertrand1978 | last post by:
Hi All. I am using VC++/Visual Studio 6.0. I can get the current screen resolution with GetSystemMetrics(), but how do you change the screen resolution ? I guess I couldn't find a...
6
by: Darian | last post by:
I am wondering how (if it is possible of course) I can change a users screen resolution to a certain size when running my application and then change it back when they exit my application. For...
4
by: Bill Nguyen | last post by:
My VB.Net app requires a minimum monitor resolution of 1024 x 768. How to get user's screen resolution and set it to the minimum at runtime? Thanks Bill
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
2
by: sab007 | last post by:
my website is best viewed, and specially designed for 1024 X 786 and higher, when shown on 800 X 600 it look horrible, now is it possible when the viewer enters my site, his/her resolution will be...
1
by: barakat ameen | last post by:
my flash movie settings 1024*768 how i can play it when the pc screen is 800*600 using falsh mx ??
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.