amird
asked on
changing the font size..
how do i change the font size of all the objects on a form
without writing for each object "<object>.font.size=<size> "
without writing for each object "<object>.font.size=<size>
ASKER
there is still a problem with the size of the contols that doesnt changed accordingly to the change in the font size
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also "lasso" a group of controls (or select all with <Ctrl A>) and change thier font as a group.
At runtime, you're going to have to iterate thru the Controls collection changing the fonts as you go. Not all controls support a font size so you'll need a little bypass logic to skip control types that don't support font size property. Basic loop will be:
dim ctrl as object
for each ctrl in controls
ctrl.fontsize = whatever
next ctrl
If you're dynamically resizing a forms' controls as the user changes rez, this is generally not a good idea. If you're doing it in response to an operator controlled selection, then that is better.
M