OpenFile dialog hangs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an app that uses the OpenFile Dialog class. When I invoke the ShowDialog method, the hourglass appears and just stays. The dialog window never opens. I created a test form with an OpenFileDialog object in a new app, and it works fine. I then added that test form to the original project, and it no longer works. So far, the application is fairly simple, it contains a treeview and a listview and some data access components. Has anyone ecer heard of this problem?
 
Netork share?

dave said:
I have an app that uses the OpenFile Dialog class. When I invoke the
ShowDialog method, the hourglass appears and just stays. The dialog window
never opens. I created a test form with an OpenFileDialog object in a new
app, and it works fine. I then added that test form to the original project,
and it no longer works. So far, the application is fairly simple, it
contains a treeview and a listview and some data access components. Has
anyone ecer heard of this problem?
 
Here is some more info. If I do not open an SQL connection, and run the app without debugging, the dialog opens. However, if I open a SQL connection prior to showing the dialog, even if I close the connection right away, the dialog hangs. It also hangs if I run under debug whether or not I open the connection. I created a test app which only contains the openfile dialog, the sql connection and a button. I cut and paste the connection string form my original app, and the dialog worked fine even with an open connection. I then made a copy of the original app and deleted everything from it except the dialog, the sql connection and a button. It looks identical to the working test app I created, but the open file dialog still does not work. I am totally confused. I am going to start cutting and pasting code from the old app into the working test app and see what happens.

----- dave wrote: -----

I have an app that uses the OpenFile Dialog class. When I invoke the ShowDialog method, the hourglass appears and just stays. The dialog window never opens. I created a test form with an OpenFileDialog object in a new app, and it works fine. I then added that test form to the original project, and it no longer works. So far, the application is fairly simple, it contains a treeview and a listview and some data access components. Has anyone ecer heard of this problem?
 
When you created the project, did you specify that it was a windows forms
project, or a control, or a console application, etc...
It may be that you created the second application using a different
selection than you used the first time, and that VS set up different
settings for you.

Just a hunch,
Good Luck,
--- Nick

Dave said:
Here is some more info. If I do not open an SQL connection, and run the
app without debugging, the dialog opens. However, if I open a SQL
connection prior to showing the dialog, even if I close the connection right
away, the dialog hangs. It also hangs if I run under debug whether or not I
open the connection. I created a test app which only contains the openfile
dialog, the sql connection and a button. I cut and paste the connection
string form my original app, and the dialog worked fine even with an open
connection. I then made a copy of the original app and deleted everything
from it except the dialog, the sql connection and a button. It looks
identical to the working test app I created, but the open file dialog still
does not work. I am totally confused. I am going to start cutting and
pasting code from the old app into the working test app and see what
happens.
----- dave wrote: -----

I have an app that uses the OpenFile Dialog class. When I invoke the
ShowDialog method, the hourglass appears and just stays. The dialog window
never opens. I created a test form with an OpenFileDialog object in a new
app, and it works fine. I then added that test form to the original project,
and it no longer works. So far, the application is fairly simple, it
contains a treeview and a listview and some data access components. Has
anyone ecer heard of this problem?
 
Thanks for the reply. I don't think I did that. Anyhow, I
cut and pasted the code from the non-working app into my
test app, one section at a time. Now it works OK. However,
when I copied the entire thing over into the test app, it
didn't work. I am not sure what is going on, but now that
it works, so I won't worry about it.
 
Back
Top