Restoring font/form size at run time problem - help!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hope someone has some ideas - this is driving me nuts,
I am using VS2008 and have a tightly layed out form at 8 pts. The form
has a font dialog and when the user changes the font size, everything works
great. I go through the forms control collection (recurively) and everything
resizes as it should.
Ok, so the next step is to remember the font size selected by the user
and select it when the form is loaded. Woops - does not work! So, I try to
do it 'earlier' in a Sub New() and it still does not work. I try it later,
in the Activated event and same problem, the form never resizes. So all the
controls have the new (larger) font, but the form (and the controls in it)
have not resized!
Ok, so I think, well I will also have to set the form size myself. This
almost works!
Some parts grow as they should, some grow more then they should and some
don't grow at all!
So, if the user is able to select a font, and it works, how do I
duplicate that when the user starts up the application again? Is there some
place besides New/Load/Activated that I should be doing this from?

TIA,
--
Terry
.



Relevant Pages

  • Re: Rotated Text fields or labels
    ... Create a PDF file from Access and show your form in Acrobat Reader. ... to get the width in points that a particular string ... will have for a given font and font size, ... The PDF route is not on, as I want to be able to drag the controls round the ...
    (comp.databases.ms-access)
  • Dialog units vs Bitmap dependence
    ... If you create a dialog and controls from a resource script, ... The existence of dialog-units has ... Pick a font and font-size with a nice pixel to dialog-unit ratio ...
    (microsoft.public.win32.programmer.ui)
  • Re: Creating dialog controls at run-time
    ... If you don't like the font, ... Choose some range for controls like 10,000 to 11,000. ... If you are creating buttons dynamically, you cannot use hardwired integer values. ... incorrectly--then you would not have had the memory leak. ...
    (microsoft.public.vc.mfc)
  • Re: adjusting fonts to computers dpi settings
    ... font size to 6 it will correct all wrong places. ... Yes, it is possible to run through the Controls changing font sizes in that manner, but personally I would not advise doing so, at least until you have looked into this problem a little further. ... Then at run time it converts those twip values into pixels using the twips per pixel setting of the machine on which the code is currently running (15 twips per pixel on a 96 dpi machine, 12 twips per pixel on a 120 dpi machine, etc, etc) and it sets both their size and position in accordance with the returned values. ...
    (microsoft.public.vb.general.discussion)
  • Re: Inconsistent Property Page Width
    ... controls on the form at runtime. ... Outlook produces different property page dimensions for my controls. ... pages appear to dynamically adjust to compensate for the font change. ... It looks bad when the user switches from an Outlook built-in tab to ...
    (microsoft.public.outlook.program_addins)