c# - winforms, form has been shown, event handler -


i need run code each time after form has been shown from.show(). tried form_activated(), form_loaded(), form.shown() ... nothing works how want, runs once, first time. there simple way how that? thank you.

you write own method showing form , throwing event in him.

public event eventhandler shownex;  public void showex() {     show();     onshownex(); }  private void onshownex() {     var eventhandler = shownex;     if (eventhandler != null)         eventhandler(this, eventargs.empty); } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -