Screen resolution routine

isnoend2001 used Ask the Experts™
Seems 2-3 yrs ago i had a routine that did this:
Combobox on form with different resolutions eg:
800 x 600
1024 x 768
1280 x 800
1280 x 1024
1152 x 864
When making a selection the form would resize to the selection as if it was actually running at that resolution. Does anyone know how to do this?
Eg: Form is shown at 1280x1024 selecting 1680x1050 the form would shrink as if the resolution was changed without actually changing the resolution
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Well, assuming you are automatically resizing controls within a form_resize event, you would simply change the form width and height parameters.

If you wanted to do it 'pixel' wise, simply use screen.twipsperpixelx (or something like that) to get the corresponding 'x' pixels, and then use 'y' for the y pixels.

But if you actually mean all the controls within the form would shrink as well (including font sizes, etc) -- never heard of that before.


I just want to see how big my form would look in a lot of different resolutions, not adjust any controls on the form..
my form is w-12540 x h-10500 at 1280 x1024 resolutation and i want to see how big it would be 1440x900

Please award the poitns, because I did actually did answer his original question, although he did not phrase it correctly. Adding to that -- if he did wish to actually change the 'screen' resolution, it would be simply a matter of using API calls to change it, and/or using the control panel applet to 'switch' resolutions. Doing a quick search, he could probably find details here:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial