When trying to use this control, how do you change the default filename, OPENFILEDIALOG1 is what is showing up in filename textbox? Any hint or clue to what I am doing incorrectly.
Here is the code that I am using:
With OpenFileDialog1
.InitialDirecto ry = "C:"
.Filter = "All Files (*.*)|*.*"
.CheckFileExist s = True
TextBox1.Text = (DataGridView1. SelectedCells(0 ).Value.ToStrin g())
hit = TextBox1.Text
'TextBox1.Text = (DataGridView1. SelectedCells(0 ).Value.ToStrin g())
'open Dialiog
If .ShowDialog = Windows.Forms.D ialogResult.OK Then
'm_InputStream = CType(OpenFileD ialog1.OpenFile (), System.IO.Strea mReader)
m_inputstream = New System.IO.Strea mReader(OpenFil eDialog1.OpenFi le)
If m_inputstream Is Nothing Then
Throw New Exception("Erro r opening the file")
End If
' OpenFileDialog1 .ToString = hit
End If
End With
Here is the code that I am using:
With OpenFileDialog1
.InitialDirecto ry = "C:"
.Filter = "All Files (*.*)|*.*"
.CheckFileExist s = True
TextBox1.Text = (DataGridView1. SelectedCells(0 ).Value.ToStrin g())
hit = TextBox1.Text
'TextBox1.Text = (DataGridView1. SelectedCells(0 ).Value.ToStrin g())
'open Dialiog
If .ShowDialog = Windows.Forms.D ialogResult.OK Then
'm_InputStream = CType(OpenFileD ialog1.OpenFile (), System.IO.Strea mReader)
m_inputstream = New System.IO.Strea mReader(OpenFil eDialog1.OpenFi le)
If m_inputstream Is Nothing Then
Throw New Exception("Erro r opening the file")
End If
' OpenFileDialog1 .ToString = hit
End If
End With
Comment