
Adjusting for Screen Resolutions
Quote:
> Does anyone no an easy way to adjust for different screen resolutions.
> I tried looping through the Form.Controls collection on the Form_load
> event of every form (using screen.TwipsPerPixelX to come up with a
> scaling factor to adjust each objects left,right,top, etc. properties),
> but I haven't quite been able to get it to work. Any help would be
> greatly appreciated.
> Thanks,
> David
A thought about this auto-scaling business: I don't know about
anyone else, but I'm using 1280x1024 mode in order to see more
windows, not so the same old windows can simply soak up more
pixels. Anyway, in my own code, I usually design for 640x480 (for
our notebook users) and let the user resize or maximize the
window if s/he wants it to take up more screen space. I usually
then save the window's size and position in the INI file in the
Close event and read it in the Load event. The resize code
usually ends up being messy, because I want some controls (like
textboxes) to resize in one dimension but not the other, and
others (such as multiline boxes or grids) to resize in both, and
still others to simply reposition themselves. I haven't found a
perfect generic solution yet.
--
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!