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

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



On Mar 25, 1:10 pm, Terry <Ter...@xxxxxxxxxxxxx> wrote:
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

Is your restore font size method different than the one you are using
to change the font size when the user changes it? Ideally, the restore
should be just retrieving a font value from a data store (.config,
registry, seperate xml, etc) and then running the same method you use
when the users changes the font size.

Thanks,

Seth Rowe [MVP]
.



Relevant Pages

  • Restoring font/form size at run time problem - help!
    ... I am using VS2008 and have a tightly layed out form at 8 pts. ... has a font dialog and when the user changes the font size, ... in the Activated event and same problem, the form never resizes. ... controls have the new font, but the form ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Resizing Components & resolution independance
    ... It resizes all controls however. ... Font sizing seems pretty important to me; I cre8 apps for various people ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Detect if overflow required
    ... that it doesn't pick up when the user changes the font size in the ... Just specify fixed font. ... is defined by the font resolution which in turn is defined by the ... only that they do not change with simple browser size changing ...
    (comp.lang.javascript)
  • System font changes - which UserPreferenceCategory to watch?
    ... I'm trying to catch System font changes (i.e. the user changes the ... Color, Window and General. ... The documentation for General says: ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Screen Resolution in VB.NET (Windows Applications)
    ... > If the user changes the screen resolution or the font size in the settings ...
    (microsoft.public.dotnet.languages.vb)