Using the OpenFileDialog and SaveFileDialog Controls

A common task for an application is to open or save a file that represents its application data. In Windows applications the Open and Save file dialog boxes provide an easy way for the user to locate a file. The .NET Compact Framework provides the OpenFileDialog and SaveFileDialog controls to interact with these dialog boxes. On Windows CE and Pocket PC, these controls allow you to navigate only the My Documents folder and one folder underneath. Because of this, you may want to create a folder underneath My Documents that will be the default location for application data.

There are a few interesting properties that you may consider setting before displaying one of the file dialog boxes to the ...

Get Microsoft® .NET Compact Framework Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.