Problem with OpenFile dialog
Hi all!
I am using VB 2005 to develop a small app that processes land parcel information. The program works very well when the .EXE is located on my station (WinXP SP2). When I place the app on a network share, the Browse button I coded no longer works. I click on the button and no OpenFile dialog appears. If I move the app back to my station, everything works great.
Are there any limitations to .NET functions when using mapped drives? Is there a service pack for the framework 2.0 to fix this problem? Is my code bad? I coded the same app in .NET 1.1 and the same problems occurs. Here is the code for the Browse button (in 2005).
Private
Sub btn_Browse_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles btn_Browse.Click'Declare the local variablesDim ofdAsNew 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 =FalseIf ofd.ShowDialog() = Windows.Forms.DialogResult.OKThen
FALPath = ofd.FileName
txt_FALPath.Text = FALPath
EndIfCatch exAs Exception
'Insert the Exception Handling code
EndTryEndSub
If anyone can help, I would be very grateful for the assistance.
Sean

