Filename:
Click the wrench icon or right-click the gadget and select 'Options' from the context menu to enter a file name and content using the gadget settings.

This sample throws an exception if you attempt to save the content to a file using the specified filename and the filename doesn't incorporate a period as a file extension separator. Otherwise, a file with the specified filename and content will be saved to the root of the user's gadget folder (obtained from the System.Gadget.path property).

NOTE: The Microsoft utility 'DebugView for Windows' can be used to view the error message generated by System.Debug.outputString in this sample. DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output this gadget generates.