Does anyone know how to resize the monitor? Some api or something?
I built my application as 800x600 stage size, I want to resize the monitor to 800x600 with a button that says "full screen" and then have a button that would switch back to the users previous monitor res.
He who never made a mistake never made a discovery?
The question is asked so often on the forum - if you will search you will find dozens and dozens of threads...
The basic point of most of them is that you cannot change someones resolution - it will cause shortcuts to move around - it's just not nice.
It's really up to you to re-size the form and controls to fit the users resolution. Some flat-screen LCD's can only run at one suggested resolution - anything else gets fuzzy letters.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
People don't like it when apps change the resolution of the screen, which you seem to want to do. It takes a minute or two, and rearranges all the desktop icons.
If the user has a higer resolution than you designed in, your forms will be slightly smaller. If you maximize your form, you will have to resize all the controls to match the resolution. You can buy a resizer control that does it automatically.
Search the forums for resizer for more information.
I built my application as 800x600 stage size, I want to resize the monitor to 800x600 with a button that says "full screen" and then have a button that would switch back to the users previous monitor res.
If your app is built for 800x600 why do you want to resize the screen not monitor to 800x600?
If you resize the Form to fit the screen then you'll have to resize all the controls for suit the new Form size.
Keith
I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
I fully agree with everyone else in this thread that you normally shouldn't change the screen resolution. However to do it you would use the ChangeDisplaySettings API function.
I would also recommend you use the EnumDisplaySettings API to ensure that the screen resolution you are trying to set is compatiable with users screen. If not, it may have some very unsavoury results.
My friend tried to set the resolution on a W98 box to something incompatible with the monitor/video card, and even safe mode didn't bring back 640x480!
I had to study the display to guess at the buttons to click, but didn't succeed.
Finally plugged in a different monitor and booted up and changed the resolution.
Don't attempt to change unknown hardware!