Scaling your form independent of screen resolution
Don't you hate it when you go to great lengths to design your forms just so, and then see it on a radically different screen resolution and it looks terrible? Would you like to be able to easily set your forms to resize themselves based on screen resolution? If so, then this code is for you.
Note that this isn't the first code to make this claim, but hopefully it will be the last. Many don't seem to realize how involved this task really is, and so offer solutions that aren't very robust.
I'll admit right now that I haven't added support for every possible control; so many have their own quirks. But I am happy to add support for specific controls you need added.
Note that this code is extremely involved. I'll explain in detail how it works in the following posts. For now, just some basic instructions and the code.
For each form you want to be resolution-independent, simply add the following line of code to the Form_Load() event:
FormLayout Me
There are many additional tweaks you can do, but that's all you really need to get started. Everything is handled by the one (very long) function. Here's a module that contains the main function, plus several more useful routines if you want to get serious about making your forms truly resolution-independent.
Last edited by Ellis Dee; May 29th, 2008 at 10:45 PM.