In my application I want to suspend a button event for some time so that I can fire another event after which the first button event will resume. In c# I am not getting how do I perform it using threads asynchronously. Please help. Thanks in advance..
Share
If you want to fire the second event and wait for it to finish before continuing, then why not just fire it synchronously from within the first event handler? That would be much simpler.
EDIT:
If you want one button to trigger the code that’s in another button’s event handler, I would suggest instead that you move it out into a separate function, and just call that. In other words, do this:
If the buttons do the exact same thing, you could even just assign them the exact same handler.
But, if you really must programmatically ‘click’ a button, then the easiest way is probably:
That’ll raise a
Clickevent.