0

I've written a console application that basically fires one BackgroundWorker that supports ReportProgress and Cancel.

How can I make sure that before a window is closed (by pressing the close button or pressing ctrl+c) the cancel operation is triggered on my thread and the window only closes after the cancel is completed?

Boris Callens
  • 90,659
  • 85
  • 207
  • 305

1 Answers1

1

See the question "How do I trap ctrl-c in a C# console app."

Community
  • 1
  • 1
Jacob
  • 22,785
  • 8
  • 39
  • 55