My Application need to save and restore components when restart next time. Such as:< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
- Change size and position of the form itself.
- Change width, order of columns of DataGridView's columns.
I want to save information configure into configuration file.
Everybody have ideas, please show me way to do it or give some solution examples.
I'm using VS.NET 2005, C#
Thanks
BeckKhiem.

Save and restore Form position and DataGridView's configuration
DanieLondon
Check out the Windows Forms section of this link:
http://lab.msdn.microsoft.com/vs2005/downloads/101samples/default.aspx
Try this link as well:
http://msdn2.microsoft.com/en-us/library/k4s6c3a0
AxelM
I use a variant of this using a database in one of my apps today. All of my show, close code is in a base class form, so all of its children get the behavior for "free."
(I'm borrowing this behavior from code that an ex-coworker had in a PowerBuilder app a decade ago.)
Mike
Ksa_Java
IsolatedStorageFile
class. It's a hidden file saved for each user on each machine, it's a simple xml file so I think an array can easely be saved.
Chimme2
Gentia
Because my application need to save and restore width, order of columns in DataGridView so i created a array
Please tell me more detail about my solution.
Thanks.
IngeW
It is a first time i have solved this solution. If you don't mind please give me your sample code. I have solved this problem for a long time, but i can't. So i post this topic in forum and hope eveybody discuss so that i can get some useful in formation.
Thanks for your help
Naive
As you said you could try saving the locations and other properties to a .ini file. You could simply use the basic textfile classes available on .net to create the .ini file. You could save it on your unload and read it on your load event. If you want it to be hidden to the users eye. THen you could store it in the registry....
cheers,
Paul June A. Domag
Nurlan Manasbaev
I think that all these replies are right. The right one to me is the dataset option and store the settings in the database.
Ive seen that Microsoft Access stores these settings this way. the data is located in the hidden tables of each mdbs. it is a little difficult to me to read the way its stored but i think it can be done.