Question:
I implement a form for handle excel file when click button “Start”. Event click Start button:Update: All References btnImport_Click:

UI:


Answer:
I don’t exactly know what you did withbtnImport_Click
, but if your purpose is to disable the function of a button at a time and to enable it at another time, actually you don’t have to register or unregister the click event, you can simply set button’s Enabled
propety.+= btnImport_Click
many times, but -= btnImport_Click
is never (or less) run.For instance if you do:
btnImport
is clicked, btnImport_Click
will get invoked twice.If you have better answer, please add a comment about this, thank you!