Visual Studio OpenFileDialog Filter

OpenFileDialog.Filter

In order to add multiple filters in the same selection, use the semicolon (;):

openFileDiag1 = “Text Files (*.txt);CSV (*.csv);zip files (*.zip)|*.txt;*.csv;*.zip|All files (*.*)|*.*”;

You place the display name to the left of the pipe symbol (|), and to the
right of the pipe symbol is the filter used by the OpenFileDialog Control.

In the example above, ‘Text Files (*.txt);CSV (*.csv);zip files (*.zip)’ will be the first
entry in the ‘Files of Type’ Combo Box on the OpenFileDialog Control.

‘All files (*.*)’ will be the second selection in the Combo Box.

Advertisements
About

Over 20 years programming experience 5 years Oracle SQL/Stored Procedure programming Over 10 years SQL 2000/2005/2008 Server SQL/Stored Procedure programming Over 18 years Visual Basic 3.0/4.0/5.0/6.0/.Net/2003/2005/2008/2010/2015 Over 10 years ASP.Net Over 7 years Visual C# Over 20 years Microsoft Office and VBA HTML JAVA COBOL EASYTRIEVE FORTRAN

Tagged with: ,
Posted in Visual Studio Code Examples
2 comments on “Visual Studio OpenFileDialog Filter
  1. security says:

    security…

    […]Visual Studio OpenFileDialog Filter « Tech and Programming Tips[…]…

  2. design, websites, hotsites, publicidade, campinas, visual, impressos, folder, cartao de visita, criacao, newsletter, e-commerce, loja virtual, e-mail marketing, digital, institucional, sistemas web, identidade, videos institucionais, marketing digita…

    […]Visual Studio OpenFileDialog Filter « Tech and Programming Tips[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: