Replacing OpenFileDialog / SaveFileDialog in .net

In an application I'm working on, I'm trying to use SaveFileDialog and OpenFileDialog for their normal purpose (saving and opening files.)

However, the application cannot support modal forms / dialogs without crashing because there are too many time sensitive things going on on the thread that owns the UI.

Rewriting your application to move these functionality out of the UI thread is not practical in the near future. To complete the function I'm working on, I need to replace two file dialog boxes, preferably a control that can live in a modeless form.

Is there anything I can use that won't block the thread associated with the UI?

+1


source to share


2 answers


The only existing option I know of is Dialog Workshop.NET , a commercial product. They have a set of dialogs that have the option to be modeless (or embedded directly into the window form instead of a separate window).



However, I would really consider trying to move your time sensitive logic to a separate thread. Having a modeless dialog can potentially confuse users, since it won't behave the way a file dialog should. There are other potential implications for having a non-blocking interface as well.

+1


source


too many time sensitive things happen on the thread that owns the UI.



This is your real problem .. Net has very robust multithreading support. I suggest you move these things elsewhere, unpleasant though it seems. This is probably less work than reimplementing the Open / Save dialogs, and will certainly be less for your application in the long run.

+2


source







All Articles