c# - Get Application first run Form -


i have 2 forms in project. when application runs, form1 opened. after opening form2.

how can access form1 form2 reflection?

why want use reflection this?

when create second form, pass in reference first one:

// assume it's code within form1 opens form2 form2 form2 = new form2(this); form2.show(); 

that's assuming you're happy add constructor form2 parameter. alternatively, make property in form2:

form2 form2 = new form2 { form1 = }; form2.show(); 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -