FolderBrowserDialog causes the "END" stmt to hang (crosspost from languages.vb)

J

JohnR

Wow, this is unbelieveable. I've narrowed it down to a few lines of code.
Create a new project in VB.NET and put 2 buttons on it (a FBD button and an
EXIT button) and enter these lines for the click events:

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExit.Click
End
End Sub
Private Sub btnDoFBD_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDoFBD.Click
Dim fbd As New FolderBrowserDialog
fbd.ShowDialog()
fbd.Dispose() 'this stmt does not make any difference as to the program
hanging on the "end" stmt
End Sub

Now run the program, click the FBD button to bring up a FolderBrowserDialog
window, click CANCEL on that window and when you return to your main form
hit the EXIT button. If you get the same results I did, your program will
hang and NOT exit.

Can anybody else verify this behaviour? Does anybody have a workaround???
or am I doing something really stupid that I don't realize?

Thanks,
John
 
J

JohnR

Some add'l information... I tried this on another system and it worked
fine. We both were running the same version of the VB Studio and
development environment (SP1), so this issue becomes much more complicated.
I still have no feel for how common this error is, or what the
differentiating factor is that causes it to appear. So if anybody else can
duplicate this problem and knows why it happens, please let me know.
Thanks.
 
J

JohnR

Ok. Problem solved. Are you ready for this??? I rebooted and then it
worked. No, I'm not running Win98, I am running XP. So I guess I was a
little spoiled by it's general reliability that it took me a whole day to do
what I would have done in 5 seconds if I was running Win98. I rebooted....
Oh, boy.

Thanks to those who took the time to try and duplicate this... I wanted to
share my (embarrassing) solution with you as a gentle reminder that
sometimes, even with XP, a little reboot can go a long way...

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top