Assuming that this is the winform information that you are talking about, after disabling the button, the event attached to it does not work. (If I remember the experience correctly)
In this case, you have two buttons, one on and one off. When the user clicks on the first button, you can hide it and show it disabled, making it look as if the same button was disabled.
Then, when you finish executing the code, try re-displaying the first button and hiding the second again.
source share