|
-
Jul 2nd, 2006, 10:24 PM
#1
Thread Starter
Fanatic Member
Save last font ?
Hello,
I am using the streamWriter/streamReader to save my last settings to a text file and then load from the text file on startup. How do I save the last font settings and recall them from the text file?
I am doing this (below) to save the font info:
sw.WriteLine(myFont.ToString());
...but I am not sure if this is what I should be doing OR how to load it back in as my font using the streamReader.
Thanks!
-
Jul 2nd, 2006, 11:35 PM
#2
Re: Save last font ?
Are you using VS 2005? If so then don't use a text file. Use the in-built application settings functionality. Also, please specify your version when creating a thread. You must have seen the radio buttons created expressly for that purpose by now.
-
Jul 3rd, 2006, 12:01 AM
#3
Thread Starter
Fanatic Member
Re: Save last font ?
Thanks. I am using Visual Studio.NET 2003....and no...I did not notice the version radio buttons. None of the ones I saw said 2005 or 2003.... but I see what you mean (I think).
I don't have the settings option in 2003. While searching for a solution to this I did see that 2005 has that feature....which is very nice. But....since I do not have that option...what do you suggest?
Thanks!
-
Jul 3rd, 2006, 07:56 AM
#4
Thread Starter
Fanatic Member
Re: Save last font ?
Hello again...
When I load my application, I am setting "myFont" to:
myFont = new Font("NATURALBORN" , 14 , FontStyle.Bold);
Now what I would like to do is "read" my font from a text file. Something like this:
The text saved to my text file (myFont.ToString()) = ...
[Font: Name=NATURALBORN, Size=14, Units=3, GdiCharSet=1, GdiVerticalFont=False]
So I need to do something like...
myFont = new Font(sr.readLine());
Obviously, that will not work unless I parse it out some how. How?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|