473,469 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 3447
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.