I am working on a very simple sticky note gadget for Windows 7. Everything is works except every time I log out, the contents of the notes get flushed. What is the best way to preserve these contents so that the text will reappear after reboot?
You can save settings for gadgets using the System.Gadget.Settings
object. The methods read
/readString
and write
/writeString
The settings are preserved when the computer restarts. A quick method of testing this is ending the sidebar.exe process then starting it again (this emulates a restart in the Windows Gadget platform.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms723661(v=vs.85).aspx