Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing screen resolution

Status
Not open for further replies.

sfarfasrew

Programmer
Dec 3, 2005
3
US
how can i change the screen resolution to 600x800 when the form loads, then back to what the screen resolution was set to before, after the form closes? Is it possible to do this without using a whole lot of code? Thanks.
 
Welcome to Tek-Tips. To get the best from the forums, please read faq222-2244 carefully.

For this question, check the Search Tab for this forum as this has been asked and answered several times. Take particular note of the warnings about potential hardware damage in thread222-810295

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Hi,

There are Windows API calls that can do this (I'll post after the weekend if you need it). However it is considered bad form to change the user's desktop settings like this unless absolutely neceessary.

Screen resolution problems are not easy to get around in VB. The best answer I have found is to design all your forms to run at the lowest common resolution your users have. That way if they have a higher screen res. the screen will appear smaller, but still be completely visible on the screen without the user having to scroll.

There is code available that will automatically resize and reposition forms and their controls dependant on screen resolution as they open, but the ones I've tried are never as satisfactory as I'd like them to be.

Ed Metcalfe.

Please do not feed the trolls.....
 
I've used ActiveResizer, and it works well to reduce the screen from 1024x768 to 800x600. It isn't free, but it's worth it if you have put time into a project and hadn't planned on changing the screen size.

David
 
Just a warning: if I downloaded a program that did that to my computer, I would immediately uninstall it, and go looking for a place where I could warn others that it does so to save them the waste of time. It is a VERY annoying thing to do. DON'T do it unless you have a very good reason for doing so.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
See thread222-1160327 for other creative things to do to programs like this. (Interestingly, I've just noticed that the thread has the same op! No offence intended, sfarfasrew.)

:)

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top