G
Guest
Hi all!
I have a problem with the OpenFile dialog that I use in my program.
I created a Browse button to allow for the selection of a text file that is
processed by my program. The Browse button works perfectly when the .EXE is
on my station. If I copy the .EXE to a network drive, the Browse button stops
functioning. I have never seen this happen before.
I created my program with VB 2005. Is this a known problem or did I code
something wrong. Here is the code for my Browse button:
Private Sub btn_Browse_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_Browse.Click
'Declare the local variables
Dim ofd As New OpenFileDialog()
FALPath = ""
Try
'Define the OpenFileDialog to obtain the raw FAL data
ofd.InitialDirectory = "C:\"
ofd.Filter = "fichiers fal (*.FAL)|*.FAL"
ofd.FilterIndex = 1
ofd.RestoreDirectory = True
ofd.Multiselect = False
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
FALPath = ofd.FileName
txt_FALPath.Text = FALPath
End if
Catch ex As Exception
'Insert the Exception Handling code
End Try
End Sub
I hope someone can enlighten me on this problem. Thanks.
Sean
I have a problem with the OpenFile dialog that I use in my program.
I created a Browse button to allow for the selection of a text file that is
processed by my program. The Browse button works perfectly when the .EXE is
on my station. If I copy the .EXE to a network drive, the Browse button stops
functioning. I have never seen this happen before.
I created my program with VB 2005. Is this a known problem or did I code
something wrong. Here is the code for my Browse button:
Private Sub btn_Browse_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_Browse.Click
'Declare the local variables
Dim ofd As New OpenFileDialog()
FALPath = ""
Try
'Define the OpenFileDialog to obtain the raw FAL data
ofd.InitialDirectory = "C:\"
ofd.Filter = "fichiers fal (*.FAL)|*.FAL"
ofd.FilterIndex = 1
ofd.RestoreDirectory = True
ofd.Multiselect = False
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
FALPath = ofd.FileName
txt_FALPath.Text = FALPath
End if
Catch ex As Exception
'Insert the Exception Handling code
End Try
End Sub
I hope someone can enlighten me on this problem. Thanks.
Sean