Is there any other way to access open forms in C#? -


 application.openforms["formname"]; 

is there other way access open form. application doesn't see form although opened. dont know why.

isn't necessary name open form. can form want index:

form frm = application.openforms[0] //will main form form frm = application.openforms[1] //will first child 

forms in openforms collection ordered in same way create it

otherwise, alternative save reference form , accessing reference.

//where want save reference: form theform; //where create form: myclass.theform = new myform(); //where want form: messagebox.show(myclass.theform.caption); 

(myclass class hold reference form, supposing accessing different classes)

(also, see if affected this: application.openforms.count = 0 always)


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -