ERROR
form에서 버튼을 누르면 이미 다른 버튼을 통해 구현한 function은 동작하지 않는다.
이를 가능케 하는 방법이다
방법
// Method1
AddRegistry_Click(null, new EventArgs());
// Method2
AddRegistry.PerformClick();
_____________________________
참고자료
https://stackoverflow.com/questions/37452382/how-to-call-button-click-event-using-normal-method-in-c
How to call button click event using Normal method in c#?
I have a method name loadTest123(). I tried to call Button1_Click event from loadTest123(). But event not occurred. I am trying to debug with break point in Button1_Click event but not triggering. ...
stackoverflow.com
https://stackoverflow.com/questions/11518529/how-to-call-a-button-click-event-from-another-method
=end
반응형