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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top