473,406 Members | 2,273 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,406 software developers and data experts.

Persisting a Font Object

Hello all.

Does anyone know how to persist or serialize a Font object? Possible?

Thanks.

Nov 20 '05 #1
3 1094
Yes, possible.
Use either the BinaryFormatter class to serialize the object into a byte
array.
You can then write the bytes to disk, or stream them out to wherever you
need them.
The BinaryFormatter will then be able to take the bytes and reconstitute
your font instance elsewhere.

-Rob Teixeira [MVP]

"David Pendleton" <qn****@gpd.arg> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hello all.

Does anyone know how to persist or serialize a Font object? Possible?

Thanks.

Nov 20 '05 #2
Thanks for the advice. I followed your advice and it worked well.

Now, my question is this: how do you persist (and restore) more than one
object per file?

Thanks again, your advice was very helpful.

Dave

"Rob Teixeira [MVP]" <RobTeixeira@@msn.com> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
Yes, possible.
Use either the BinaryFormatter class to serialize the object into a byte
array.
You can then write the bytes to disk, or stream them out to wherever you
need them.
The BinaryFormatter will then be able to take the bytes and reconstitute
your font instance elsewhere.

-Rob Teixeira [MVP]

"David Pendleton" <qn****@gpd.arg> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hello all.

Does anyone know how to persist or serialize a Font object? Possible?

Thanks.


Nov 20 '05 #3
Figured this out too...

Thanks again.

--
ROT13 my email address to reply: qn*****@gpd.arg

"David Pendleton" <qn****@gpd.arg> wrote in message
news:uk**************@TK2MSFTNGP09.phx.gbl...
Thanks for the advice. I followed your advice and it worked well.

Now, my question is this: how do you persist (and restore) more than one
object per file?

Thanks again, your advice was very helpful.

Dave

"Rob Teixeira [MVP]" <RobTeixeira@@msn.com> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
Yes, possible.
Use either the BinaryFormatter class to serialize the object into a byte
array.
You can then write the bytes to disk, or stream them out to wherever you
need them.
The BinaryFormatter will then be able to take the bytes and reconstitute
your font instance elsewhere.

-Rob Teixeira [MVP]

"David Pendleton" <qn****@gpd.arg> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hello all.

Does anyone know how to persist or serialize a Font object? Possible?

Thanks.



Nov 20 '05 #4

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

Similar topics

1
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS...
2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
7
by: Derrick | last post by:
Can anyone tell me how to persist and retrieve the font characteristics that a user chooses to have displayed in a personalized label field on the front of their application? I wanted to be able...
4
by: Dave Veeneman | last post by:
When does serializing objects make more sense than persisting them to a database? I'm new to object serialization, and I'm trying to get a feel for when to use it. Here is an example: I'm...
1
by: lim | last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution. In my page there's some basic server control. Is there any loops holes?
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...
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...
2
by: xenophon | last post by:
I added a Hidden Form Field to a form in the code behind. The value is being set in JavaScript client-side, but it is not persisting to the server in the PostBack. I know the value is being set...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.