469,913 Members | 2,683 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

OpenFile dialog hangs

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?
Nov 15 '05 #1
4 5945
Netork share?

"dave" <an*******@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
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?
Nov 15 '05 #2
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?
Nov 15 '05 #3
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" <an*******@discussions.microsoft.com> wrote in message
news:4C**********************************@microsof t.com...
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?
Nov 15 '05 #4
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.
-----Original Message-----
When you created the project, did you specify that it was a windows formsproject, or a control, or a console application, etc...
It may be that you created the second application using a differentselection than you used the first time, and that VS set up differentsettings for you.

Just a hunch,
Good Luck,
--- Nick

"Dave" <an*******@discussions.microsoft.com> wrote in messagenews:4C**********************************@microso ft.com...
Here is some more info. If I do not open an SQL
connection, and run theapp without debugging, the dialog opens. However, if I open a SQLconnection prior to showing the dialog, even if I close the connection rightaway, the dialog hangs. It also hangs if I run under debug whether or not Iopen the connection. I created a test app which only contains the openfiledialog, the sql connection and a button. I cut and paste the connectionstring form my original app, and the dialog worked fine even with an openconnection. I then made a copy of the original app and deleted everythingfrom it except the dialog, the sql connection and a button. It looksidentical to the working test app I created, but the open file dialog stilldoes not work. I am totally confused. I am going to start cutting andpasting code from the old app into the working test app and see whathappens.

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

I have an app that uses the OpenFile Dialog
class. When I invoke theShowDialog method, the hourglass appears and just stays. The dialog windownever opens. I created a test form with an OpenFileDialog object in a newapp, 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, itcontains a treeview and a listview and some data access components. Hasanyone ecer heard of this problem?
.

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael | last post: by
1 post views Thread by Mr Gordonz | last post: by
1 post views Thread by Fabiano | last post: by
1 post views Thread by Sean Campbell | last post: by
4 posts views Thread by Marco Trapanese | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.