CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Location
    Kuwait
    Posts
    170

    [RESOLVED] Openfile dialog

    I tried with following code. But when i select <i>all file</i> option, no files are shown in the selected part
    Code:
    Dim openFileDialog1 As System.Windows.Forms.OpenFileDialog
    
            openFileDialog1 = New System.Windows.Forms.OpenFileDialog()
            openFileDialog1.InitialDirectory = Environment.SpecialFolder.Desktop
            openFileDialog1.Filter = "Sale Files(*.DBF;*.XLS)|*.DBF;*.XLS;|All files(*.*)|*.* "
    
            If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
                txtsalefilepath.Text = openFileDialog1.SafeFileName
            End If

  2. #2
    Join Date
    Jul 2009
    Location
    Kuwait
    Posts
    170

    Re: Openfile dialog

    Oops i got it solved ,
    Code:
     openFileDialog1.Filter = "Sale Files(*.DBF;*.XLS)|*.DBF;*.XLS;|All files(*.*)|*.*; "
    ; was missing at the end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured