×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Changing screen resolution using VB6

Changing screen resolution using VB6

Changing screen resolution using VB6

(OP)
Hi VBForum,

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

Regards,
gtsim

RE: Changing screen resolution using VB6

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:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=52479&lngWId=1

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: www.essexsteam.co.uk

RE: Changing screen resolution using VB6

(OP)
Thank very much John,

Review before implications before use.

Best wishes,
gtsim

RE: Changing screen resolution using VB6

(OP)
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

RE: Changing screen resolution using VB6

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:
http://www.allapi.net/apilist/GetSystemMetrics.shtml

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: www.essexsteam.co.uk

RE: Changing screen resolution using VB6

(OP)

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
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close