C# Programming
07-28-2012, 04:40 AM
Hi,
I am searching for MDI child using this code and activating it when exists.
I want to know how can I set label text before the search_form.Activate() line? I tried search_form.lblFindWhat.Text = "something" but it was not recognized although i set the lblFindWhat Modifier to Public.
here is the code:
foreach (Form search_form in this.MdiChildren) { if ((string)search_form.Tag == "BROWSE_PATIENTS") { search_form.lblFindWhat.Text = "something"; search_form.Activate(); is_form_exists = true; break; } }
I am searching for MDI child using this code and activating it when exists.
I want to know how can I set label text before the search_form.Activate() line? I tried search_form.lblFindWhat.Text = "something" but it was not recognized although i set the lblFindWhat Modifier to Public.
here is the code:
foreach (Form search_form in this.MdiChildren) { if ((string)search_form.Tag == "BROWSE_PATIENTS") { search_form.lblFindWhat.Text = "something"; search_form.Activate(); is_form_exists = true; break; } }