locked
FileOpenDialog

    Question

  • i have to create the FileOpenDialog, & there are lot of types of filters needs to be added which are specified below:

    All Files(*.*)
    All Excel Files(*.xl;*.xlsx;*.xlsm;*.xlam)
    All Web Pages(*.htm;*.html;*.mht)
    XML Files(*xml)
    Test Files(*.prn;*.txt;*.csv)

    how can i specifiy Filter & FilterIndex to show above extensions in FileOpenDialog?

    Thanks, Sruthi

    Tuesday, September 14, 2010 6:45 AM

Answers

  • openFileDlgBox.Filter = "All Files (*.*)|*.*|All Excel Files (*.xl;*.xlsx,*.xlsm)|*.xl;*.xlsx,*.xlsm|"
    • Proposed as answer by AdityaReddyM Tuesday, September 14, 2010 7:11 AM
    • Marked as answer by Sruthi M Tuesday, September 14, 2010 7:12 AM
    Tuesday, September 14, 2010 7:11 AM

All replies

  •  

    open.Filter = "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*";

    Tuesday, September 14, 2010 6:53 AM
  • openFileDlgBox.Filter = "All Files (*.*)|*.*|All Excel Files (*.xl;*.xlsx,*.xlsm)|*.xl;*.xlsx,*.xlsm|"
    • Proposed as answer by AdityaReddyM Tuesday, September 14, 2010 7:11 AM
    • Marked as answer by Sruthi M Tuesday, September 14, 2010 7:12 AM
    Tuesday, September 14, 2010 7:11 AM