Open File Dialog?  
Author Message
JuKiM





PostPosted: Visual Basic Express Edition, Open File Dialog? Top

Hi,

I have a problem saving the path of a file.. I use the OpenFileDialog (wich I think is not correct in order to do what I need) and then, i would like only to save the path of the selected file, I don't want to open the file. Is possible to do it with the OFD How can I do it

Thanks!



Visual Studio Express Editions34  
 
 
Paul Domag





PostPosted: Visual Basic Express Edition, Open File Dialog? Top

Hi,

Yes you can do that. You can use the FileName property of the OFD. It contains teh fullpath of the file. YOu can just parse it to eliminate the filename so you can just have the directory. OR is it what you intend to do

Actually when you use the OFD it only lets you pinpoint the location of the file. The actual opening of teh file happens through your code. What OFD is returning you is the full address of the file that you want to open. So, if you don't want to open the file, just retrieve its path, then you can use the FileName property...

cheers,

Paul June A. Domag