C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » Visual Studio »

How to filter happening in open file dialog (for beginners)


Posted Date: 30 Aug 2009    Resource Type: Articles    Category: Visual Studio
Author: VeerabaguMember Level: Gold    
Rating: 1 out of 5Points: 5



Description
In open file dialog we can filter the restricted file format like xml, txt, .doc etc the following code explains how to filter those file types


OpenFileDialog openFileDialog1 = new OpenFileDialog();

openFileDialog1.InitialDirectory = "d:\\" ;
openFileDialog1.Filter = "Xml Files (*.xml)|*.xml|All files (*.*)|*.*" ;
openFileDialog1.FilterIndex = 2 ;
openFileDialog1.RestoreDirectory = true ;

if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
}


in the above code i am filtering the xml files and *.* files



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
How to filter happening in open file dialog (for beginners)  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to access ProfessionalColors Class in Csharp (with cute example)
Previous Resource: Multi Thread implementation using Background worker process
Return to Discussion Resource Index
Post New Resource
Category: Visual Studio


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use