hi ,
i created window application and problem is when i close the application then take
some time and i thing some object in application tack time to dispose how make a fast
quit application
i m using application.exist();
any other option
help me
thanks.
Loading


Kirtan PatelRank #292 · 8.6K reputationPosted Oct 30, 2009, 8:15 PM EDT
Here is Code to Close the Process Immediately ...
using System.Diagnostics;
private void button1_Click(object sender, EventArgs e)
{
Process p = Process.GetCurrentProcess();
p.Kill();
}
Friend , i seen that you are not you are not checking "Do you like this answer" even if the answer helps you ..i have answered your many questions ..but after asking question even you not responding also.
so please do it :) it encourage the helper to answer your questions :)
jingeRank #2,527 · 554 reputationPosted Oct 30, 2009, 8:17 PM EDT
Please check out if you are using multi-thread in your application, or if you are doing some long time job in the Closing event handler of any form .
Dharmesh SharmaRank #1,974 · 741 reputationPosted Oct 30, 2009, 9:11 PM EDT
just simple object and use reference
some other idea
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 30, 2009, 9:52 PM EDT
it will do the same task as Application.Exit()
but Will terminate the Application Immediately
Roy Spoolder29 reputationPosted Nov 26, 2009, 3:30 AM EST
You're right, Application.Exit(); is the simplest way to close your application.
With a difficult solution. Increase the chances of errors in your code.
Regards,
Roy Spoolder.