openFileDialog prob

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thuthime
    New Member
    • Oct 2007
    • 9

    openFileDialog prob

    im programmin in Visual studio 2005 .NET enviroment
    i used openFileDialog but the thin is i dont know how to restrict
    file types....

    my prgram is a printer Queue so the user should not be able to select .EXE extensions & .ZIP etc

    how can i validate this
    please help
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    You need to set the filter property of the class (or in C the szFilter member of the structure)

    Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

    Comment

    • thuthime
      New Member
      • Oct 2007
      • 9

      #3
      thank u very very much.....tanx again...

      Comment

      Working...