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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -