473,378 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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
Mar 25 '08 #1
2 1725
On Mar 25, 1:10 pm, Terry <Ter...@nospam.nospamwrote:
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]
Mar 25 '08 #2
Never Mind - I got it!

Been looking at TableLayoutPanels inside TableLayoutPanels inside panels
inside splitergroups etc until I am blue in the face! I found my problem and
it all works fine, sorry for wasting anyones time.
--
Terry
"Terry" 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
Mar 25 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go,...
2
by: Jack Russell | last post by:
Sorry another dumb question about vb.net How do I save a font (in a text file) so that I can restore it at later date. I thought MyString=txtBox.font.tostring Write that away.
0
by: Hariharan Subramony | last post by:
Hi Guys, I have the following issue ... I have a form with two richTextBoxes named (01) richTextBox1 (02) richTextBox2 with some controls for selecting Font types (Arial, Courier, etc)...
0
by: Martin Streller | last post by:
Hello, The code below represents a simple ownerdrawn, Listview class in C#. Its purpose is to avoid the flicker of the MS ListView. So I can't fall back to their one. Does anybody know why I...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
1
by: Tom | last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I also have, in the appliation, a general 'Preferences' class object (which is in itself a separate DLL, and I just include a...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
6
by: Miro | last post by:
Is there a way to / or a mathematical formula to see if a font size is 'too big' for a label. I have a label that is docked to 'fill' a form, and I want to resize that font based on the width...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.