質問

I want to Browse a File on button click And get file path in a text box.

Here is what I have tried :

FolderBrowserDialog1.ShowDialog()
TextBox66.Text = FolderBrowserDialog1.SelectedPath

This is not working. Any suggesions ?

役に立ちましたか?

解決

You can try this:

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles        Button1.Click
    Dim oFileDlg As New OpenFileDialog
    oFileDlg.ShowDialog()
    textbox1.text = oFileDlg.FileName
End Sub
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top