C#Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
i have written a winApp with some threads , but when i close the main form(the winApp),it cant be closed completely,there is still
some thread run background. i have aborted the threads i created
in closingwindow event.
Your application will not terminate as long as there is atleast one thread still running even if it's idle/asleep/background. When you close the last loaded form/UI interface, you will simply exit the message loop. If another thread is alive it will not end.
It's good you found the thread that was still alive.
I suggest you add Environment.Exit(0) to your code. It will terminate any thread you might have forgot about.