|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
openfiledialog control locks folderHello all,
I am using an openFileDialog box to select a file (in order to insert it in a database). When the file is selected i am filling a few textboxes with the actual path, filename and extension of the file, so i no longer need the openfiledialog, thus i am using openfiledialog1.reset() method to reset it. (i have also tried openfiledialog.dispose() with no results) The problem i am encountering is that the folder in which the selected file resides is somehow locked by the application and i can not rename/copy/etc if i do not close the application (or reopen the openFileDialog to select another folder). Is there a way to release the lock on the folder without closing the app ? Thx in advance theodore Theodore,
That is most unlikely what you tell, I never saw this in these dotNet newsgroups. Are you sure you have all files closed after using? Cor
Show quote
Hide quote
"juststarter" <juststar***@discussions.microsoft.com> schrieb: I am able to reproduce this behavior using .NET 1.1 SP1, Windows XP > I am using an openFileDialog box to select a file (in order to insert it > in > a database). When the file is selected i am filling a few textboxes with > the > actual path, filename and extension of the file, so i no longer need the > openfiledialog, thus i am using openfiledialog1.reset() method to reset > it. > (i have also tried openfiledialog.dispose() with no results) > The problem i am encountering is that the folder in which the selected > file > resides is somehow locked by the application and i can not rename/copy/etc > if > i do not close the application (or reopen the openFileDialog to select > another folder). Professional SP2. Setting the file dialog's 'RestoreDirectory' property to 'True' seems to fix the problem. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Herfried,
Than I saw it now for the first time. (And remember that of course) :-) Cor |
|||||||||||||||||||||||