Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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