Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / August 2004

Tip: Looking for answers? Try searching our database.

serialize graphicspath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JZ - 27 Aug 2004 09:19 GMT
Hi,

I'm writing a small graphics program, a sort of scribble pad.

I need to be able to save a graphics path.

I think my question is how do I serialize a graphicspath.

I want to do something like this...

       Dim FileStream As Stream = File.Open(pstrFileName, FileMode.Create)
       Dim FileFormatter As New BinaryFormatter()
       FileFormatter.Serialize(FileStream, pHash)
       FileFormatter.Serialize(FileStream, MyGraphicsPath)
       FileStream.Close()

I've read postings which say it can't be done?

Could it be done without using the binary formatter.

Please respond with stuff I can understand!!

Thanks in advance!

Signature

JZ

James Westgate - 27 Aug 2004 10:30 GMT
Hi,

The formatter doesnt matter. The formatter is what is used to serialize the
graphicspath once the serializationinfo has been populated - either binary
or xml/soap being the two available formatters.

A graphicspath is made of  arrays of Types and Points which can be accessed
via the PathData property. The points are an array of PointF structures and
the Types an array of bytes. These arrays can be serialized and then
deserialized into the graphicspath constructor.

James

Signature

Create interactive diagrams and flowcharts with ERM Diagram at
http://www.crainiate.net

Take the ERM Tour at http://www.flowchartcontrol.com

> Hi,
>
[quoted text clipped - 19 lines]
>
> Thanks in advance!
JZ - 27 Aug 2004 10:36 GMT
It doesn't matter I found this posting...

This orked for me instead..

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&safe=off&selm=Ow2N0rknDHA.208
0%40TK2MSFTNGP10.phx.gbl


Signature

JZ


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.