Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Changing screen resolution using VB6 1

Status
Not open for further replies.

gtsim

Mechanical
Aug 10, 2005
90
DE
Hi VBForum,

How can I change the screen resolution using VB6? Any help will appreciated, thanks.

Regards,
gtsim
 
Replies continue below

Recommended for you

Think very carefully about the implications of this action before proceeding!

I you really need to upset your users and risk legal action them there are plenty of ready made projects out there to change screen resolution, for example:

HOWEVER:
1. Most computer users will be very upset if you mess with their hardware settings

2. Be prepared for the lawsuits which follow when your program damages monitors. There are many monitors in use that will be physically damaged if driven at screen resolutions beyond their capabilities.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

Steam Engine enthusiasts:
 
Thank very much John,

Review before implications before use.

Best wishes,
gtsim
 
John,

The url you have given claims it does not change setting(hardware or registry). We do not wish to drive monitors at capabilities outside there range. For example we want to set the resolutions to the most standard setting (e.g. 1024x768). Virtually all monitors support this resolution.

Do you have any bad experience specially using the code given in this url? Kindly advice.

Regards,
gtsim
 
Yes I have seen physical damage. Out there in the real world there are still a large number of 800 x 600 displays, and quite a few 640 x 480. If your application is going to the open market you will need to ensure that you don't try to drive the older displays at 1024 x 768.

The program obviously can't make hardware changes, but does change software video card settings.

If you must do this, then at least ensure that you are only changing down, not up. Changing a 1600 x 1200 screen to 1024 x 768 won't do physical damage (it will only annoy the user), but changing 640 x 480 to 1024 x 768 may well physically damage the monitor.

To check current settings you can use GetSystemMetrics API. There is a worked example at:

I would still advise designing your app so that it works at more than one screen resolution, for instance by dynamically resizing controls etc.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

Steam Engine enthusiasts:
 

Thanks John for the advice and alert. It is very much appreciated. Shall visit the link given in your response and review the whole subject of screen resolution changes.

Thanks once again and best wishes,
gtsim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top