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
  • 86,820
  • 84
  • 205
  • 301

1 Answers1

1

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

Community
  • 1
  • 1
Jacob
  • 21,915
  • 7
  • 38
  • 55