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
karhong karhongPosted Jul 16, 2008, 8:47 PM
Em, I'll try on the Serialise and then get back to you...
Thank you all for the fast reply!
Posted Jul 16, 2008, 4:10 PM
Mahesh ChandPosted Jul 16, 2008, 1:53 PM
Hmmm.. this is the way if you want to keep track of your objects, their position and properties. If there are no changes to the shapes and you just want to display, you can use them as an Image using the Bitmap and Image classes.
Alternatively, you can create a GraphicsPath and add all shapes to it and save the path and within the path, you save shapes but still you will have to load your text file and recreate the shapes.