Save WinForm or Controls to File

后端 未结 6 2118
旧巷少年郎
旧巷少年郎 2021-01-24 09:52

I have been working on an application which allows the user to make a label template for printing purposes by adding label controls to a panel(which I use as a container). I ha

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-24 10:27

    I wouldn't directly serialize a form to a file. Sounds like you need to create a class that will hold the state of the user's work. You should then serialize that class to and from a file. There are built in methods for that using either Binary or XML Serialization.

提交回复
热议问题