×
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

Setting Screen Resolution

Setting Screen Resolution

Setting Screen Resolution

(OP)
Hi All,

I was wondering if there is a way to change a PC's Resolution when it starts my VB program. (and possibly back again once its finished)

I am wanting to do this because I have created a program that works best on one resolution and it may be used on a variety of computers. To save people having to change their resolution everytime they run my program it would be easier if the program changed it for them.

Any help appreciated.

Cheers

Hojo

RE: Setting Screen Resolution


Yes it's easy to do! BUT be very sure that you really want to do it. There are still many PCs out there that support very limited choice of resolutions, and if you try and force them you may do physical damage to the monitor.

There is also the matter of common courtesy - if you try and change my computer hardware settings, I would get very upset, and I'm sure many others would as well!

If you're really sure then you'll need to use the ChangeDisplaySettingsEx API. There is a worked example here:
http://www.mentalis.org/apilist/ChangeDisplaySettingsEx.shtml

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

UK steam enthusiasts: www.essexsteam.co.uk

RE: Setting Screen Resolution

Good answer johnwm.

Please allow me to reinforce the warning.  

==> you try and change my computer hardware settings, I would get very upset, and I'm sure many others would as well!
Me too.  Proceed with extreme caution.

You also run the risk of 'breaking' another application already running at the time.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein

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



News


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