Tuesday, June 1, 2010

FileDialog.Filter Property

http://msdn.microsoft.com/en-us/library/microsoft.win32.filedialog.filter.aspx
OpenFileDialog dlg = new OpenFileDialog();  
// Filter by Word Documents OR Excel Worksheets OR PowerPoint Presentations
// OR Office Files

// OR All Files

dlg.Filter = "Word Documents|*.doc|Excel Worksheets|*.xls|PowerPoint Presentations|*.ppt" + "|Office Files|*.doc;*.xls;*.ppt" + "|All Files|*.*"; dlg.ShowDialog();

No comments:

Post a Comment