473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

openfiledialog control locks folder

Hello 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

Nov 21 '05 #1
3 3444
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
Nov 21 '05 #2
"juststarter" <ju*********@discussions.microsoft.com> schrieb:
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).


I am able to reproduce this behavior using .NET 1.1 SP1, Windows XP
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/>

Nov 21 '05 #3
Herfried,

Than I saw it now for the first time.
(And remember that of course)
:-)

Cor
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mr. B | last post by:
If you can set the 'initial' path of an OpenFileDialog box by something like the following: Dim FilesPath As String ' Files Path FilesPath = "P:\Projects\" FilesPath =...
1
by: Paras Wadehra | last post by:
Hi Friends, Can anyone please help me with the OpenFileDialog Control in VB.Net? I want the user to be restricted to a particular folder only for selecting a file, i.e. they should not be able...
2
by: anonymous | last post by:
the dotnet OpenFileDialog brings up a window that looks similar to a File Explorer window, and indeed depending on some user settings may list files in a details view, thumbnails view etc. Is...
4
by: Nagachandra Sekhar Grandhi | last post by:
I am facing a problem with OpenFileDialog. It is as follows. I opened OpenFileDialog dialog box and selected a folder in it. After selecting the folder when i tried to delete the same folder in...
1
by: Paras Wadehra | last post by:
Hi Friends, Can anyone please help me with the OpenFileDialog Contol in VB.Net? I want the user to be restricted to a particular folder only for selecting a file, i.e. they should not be able to...
7
by: Sakharam Phapale | last post by:
Hi All, I want to give option to user for selecting directory, just like for selecting file using OpenFileDialog control. How to make it possible?
2
by: Greg | last post by:
I'm a bit confused by this - when I set the InitialDiretory of an OpenFileDialog to be a subfolder within the same folder as the app, the file dialog does not initially display the folder - instead...
4
by: NickP | last post by:
Hi there, This is really crazy! 1. Make a folder 2. Put a text file in the folder 3. Run the following code... Dim pop As New OpenFileDialog Using pop
1
by: sam | last post by:
OpenFileDialog appears to be "holding onto" the parent folder of a selected file until the application using the dialog quits. After creating a folder containing a file, I attempted to select...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.