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
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:
h
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
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