문제

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