Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

VB: Alter Desktop resolution?


  • Please log in to reply

#1
ChrisWright

ChrisWright

    Member

  • Member
  • PipPip
  • 34 posts
I have some simple understanding of how to use VB6, and have made a couple of simple programs now that all seem to been fine and dandy, except theres no real need for them...

Now i have came to wonder:

Is it possible to use Visual Basic to change the resolution the computer is set on?


The reason is that when my computer starts up, it is always in 1024x768, even though my monitor has a native 1280x1024.... That means every time i start my computer up, it is in the wrong res, and i have to change it... I cannot solve this problem it seems, with any combination of reinstalled / new drivers, and i cannot identify the cause...

Thanks in advance,
Chris

Edited by ChrisWright, 05 September 2006 - 12:16 PM.

  • 0

Advertisements


#2
cso

cso

    Member

  • Member
  • PipPip
  • 23 posts
Hiya Chris,
The ChangeDisplaySettings function changes the settings of the default display device to the specified graphics mode.
You should be able to call this from VB.
I'd be curious why this happens in the 1st place. Maybe post on one of the forums for your OS or Graphics card.
Anyway, good luck.
  • 0

#3
ChrisWright

ChrisWright

    Member

  • Topic Starter
  • Member
  • PipPip
  • 34 posts
Hmm... having a little problem trying to find 'ChangeDisplaySettings', and the only VB code I have found on Google for changing the resolution.

Any more help people can give?

Thanks,
Chris
  • 0

#4
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
You'll have to use APIs. I found this rather super-complicated thing: http://www.tek-tips....qs.cfm?fid=2898. Try using it. Just follow the first few comments, I bet you don't need to know how the whole thing works :whistling:

Just out of interest, why do you need to do that?
  • 0

#5
warriorscot

warriorscot

    Member 5k

  • Retired Staff
  • 8,889 posts
Solve the problem properly instead of finding a quick/long fix because there is clearly something wrong in windows preserving your settings after shutdown or your gfx card driver. VB can do it there is a couple of ways its not all that easy.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP