c# - Retrieve a hidden form -


i have hidden form want show. don't want create 1 this:

form1 f1 = new form1(); 

since i'm using notification area icon. when opening new window, multiple notification area icons.

so there way show hidden form?

yes.

linq way:

var frm = application.openforms.oftype<form>().firstordefault(x => x.gettype() == typeof(form1));  if (frm != null) {    frm.show(); } 

or iterate on application.openforms

foreach (var form in application.openforms) {     if (form form1)     {          form.show();          break;     } } 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -