You are using a wireless connection to detect intruders in your hacking network while breaking the code. If an intrusion is detected spying your network, you must abort the code breaking process, and you will avoid the detection of your location by the spies. Hiding the controls does not stop the code breaking process. Therefore, it is very important to provide the application with a fast cancellation procedure. Hurry up, the FBI is on your tail!
We are going to make some changes to our example to allow the user to cancel the loop at any time without delegates or callbacks, using the features provided by the BackgroundWorker component: