Hi
In Vis Studio 2008 C# is there a method of making a button have prioity over the rest there was I remember a method in VB6. What I'm after is a loop (or maybe a timer) running that checks every second or so to see if the button has been clicked if this has been clicked stop every thing. The thing is I have tried this and had results varying from nothing to the PC rebooting if the timer approach is do-able would there be any problems with the method I have tried it to find clicked the button something else overrides it does the something else then spots the button and stop the test cleanly ?

1 answers
The easiest way to give a button priority over the others is to disable the others (set Enabled to false) whilst you're doing whatever it is you're doing.
You can then place the code to stop the application in the button handler for the remaining button.
If the operation completes without the user pressing the 'stop' button you can, of course, re-enable all the other buttons if you want to continue to run the application.
answered one year ago by:
17279