|
-
Jul 26th, 2007, 08:42 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [02/03] OpenFileDialog is locking the FileName folder
Hello,
I can break it down to this simple:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New OpenFileDialog
f.ShowDialog()
f.Dispose()
End Sub
Say, I navigate the OpenFileDialog to my desktop, there is a folder called "Docs." At this point I can rename Docs, however, if I double-click Docs, I can no longer rename it. This makes sense to me. If, however, I select a file inside Docs, then Dispose of the OpenFileDialog, I still can't rename Docs. The only way that I can rename it is to either Exit the program entirely, OR I have found that I can click Button1 again. This opens another OpenFileDialog, I navigate to a different folder (or just hit back), and now I can rename Docs again.
I have tried changing the .InitialDirectory and .FileName of the OFD after .ShowDialog, but it didn't work. Has anyone else encountered this problem? Does anyone have a solution?
The problem comes because this is a multi user application and some people might leave it open all day, which could cause a folder to be locked for quite some time.
VB.Net 2008
.Net Framework 2.0
"Must you breathe? 'Cause I need heaven..."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|