Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
My application is already writing a timed excel sheet in the background. I have now exported and excel sheet and want to open it from my application.

so for it is used process.start

System.Diagnostics.Process.Start(FilePath);

Problem is after the file is being opened, control does not return to the code and my open file dialog box hangs.

Thus i have to close the application and restart it.

Please Suggest a solution.
Posted
Comments
Kiirrii 30-Mar-12 1:23am    
used fileupload control..

1 solution

Who is developing such things without threading? You should do any blocking call from the UI thread, not even any time-consuming operations. Unfortunately, you did not share with us what type of application or UI library do you use, but the ideas are very similar.

Please start here:
http://msdn.microsoft.com/en-us/library/ff647051.aspx[^],
http://msdn.microsoft.com/en-us/magazine/cc163328.aspx[^].

See also my past answer to related questions:

Control.Invoke() vs. Control.BeginInvoke()[^],
Problem with Treeview Scanner And MD5[^];

How to get a keydown event to operate on a different thread in vb.net[^],
Control events not firing after enable disable + multithreading[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900