S
SF
Hi,
I have a VS2008 application form using Visual Basic. In one of the form, I
have a textbox (txtPath) and a button with the code below. When I try to
assign txtPath to a file select in OpenfileDialog I got a blue line
underline the code.
Imports System.Windows.Forms
Imports System.Windows.Forms.OpenFileDialog
Public Class ProposalManagement
Private Sub btnOpenFile_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOpenFile.Click
Dim fdlg As OpenFileDialog = New OpenFileDialog()
fdlg.Title = "Select Document to files"
fdlg.InitialDirectory = "C:\"
fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"
fdlg.FilterIndex = 2
fdlg.RestoreDirectory = True
If fdlg.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.txtPath = fdlg.FileName <=== Error is here
End If
End Sub
End Class
SF
I have a VS2008 application form using Visual Basic. In one of the form, I
have a textbox (txtPath) and a button with the code below. When I try to
assign txtPath to a file select in OpenfileDialog I got a blue line
underline the code.
Imports System.Windows.Forms
Imports System.Windows.Forms.OpenFileDialog
Public Class ProposalManagement
Private Sub btnOpenFile_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOpenFile.Click
Dim fdlg As OpenFileDialog = New OpenFileDialog()
fdlg.Title = "Select Document to files"
fdlg.InitialDirectory = "C:\"
fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"
fdlg.FilterIndex = 2
fdlg.RestoreDirectory = True
If fdlg.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.txtPath = fdlg.FileName <=== Error is here
End If
End Sub
End Class
SF