SolvedHelp With OpenFileDialog/textBox

Posts 1–6 of 6 · Page 1 of 1
Help With OpenFileDialog/textBox
Hey i have OpenFileDiolog and i want to make a path to open Crossfire NA
Code:
Private Sub GhostButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton6.Click
        OpenFileDialog1.Filter = Whats code that goes here? 
        OpenFileDialog1.ShowDialog()
    End Sub
End Class
Like Browse for File Crossfire "patcher_cf"
The filter is in the following format:

Code:
<display text>|<filter>
So for text files it would be:
Code:
Text Files (*.txt)|*.txt
or simply
Code:
Text Files|*.txt
Quote Originally Posted by Stanman08 View Post
Hey i have OpenFileDiolog and i want to make a path to open Crossfire NA
Code:
Private Sub GhostButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton6.Click
        OpenFileDialog1.Filter = Whats code that goes here? 
        OpenFileDialog1.ShowDialog()
    End Sub
End Class
Like Browse for File Crossfire "patcher_cf"
Code:
OpenFileDialog1.Filter = "Application Files (*.exe)|*.exe"
If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
' Whatever you want it to do after someone opens something
End If
Quote Originally Posted by Stanman08 View Post
Hey i have OpenFileDiolog and i want to make a path to open Crossfire NA
Code:
Private Sub GhostButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton6.Click
        OpenFileDialog1.Filter = Whats code that goes here? 
        OpenFileDialog1.ShowDialog()
    End Sub
End Class
Like Browse for File Crossfire "patcher_cf"
Code:
Private Sub GhostButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton6.Click
        OpenFileDialog1.Filter = "Exe files | *.exe"
        OpenFileDialog1.ShowDialog()
        TextBox1.Text = OpenFileDialog1.FileName
    End Sub
End Class
Thanks Guys will see whitch one works
It must work. Solved
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us