0

Hi,

I'm wondering, whether is there any other methods to save the shape into a file?
Meaning that I've already drag few shape and I wanted to save all the shapes, their position, their colour.

What I'm thinking now is, getting all the shape's coordinate, colours, size and save it into a text file.
Then when loading the file, I need to recreate all the shape based on the information of the text file.

Is there any other method in C# which make my saving shape easier?? Such as save with other format, then enable me to load the file easier??

Regards,
Kar Hong

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by karhong
0

Hi,

You can also serialize the objects. This will save the object in a file and then you can retrieve then like objects to. Among the clases that you will need to use are FileStream, StreamReader, StreamWriter,..., this clases are in the System.IO namespace. Also you need to mark the class as [Serializable]

Regards,
Camilo

0

Em, I'll try on the Serialise and then get back to you...

Thank you all for the fast reply!
:twisted:

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.