Salam/Hi, I have two winform, 1 named as "fudafrm" another is "loginfrm".I want to control tabs or close 3,5 and 8 tab which is located in fudafrm through loginfrm,when Id and password is correct.
fudafrm is this:
AND loginfrm is :
I tried thees code in loginfrm: (wrong codes)
if (txt_userid.Text == "user" && txt_password.Text == "user")
{
Form f1 = new fudafrm();
TabControl.TabPageCollection("tabpage3").hide();
TabControl.TabPageCollection("tabpage5").hide();
TabControl.TabPageCollection("tabpage8").hide();
this.Hide();
}
else
{
MessageBox.Show("Invalid User Name & password","Error");
}
kindly help me for controlling tabs through other forms. I am using windows form C# visual studio 2010.