0

hi all,
iam newbie to c sharp and still trying to learn..iam developing a new windowsapplicattion in csharp and i am trying to open a new form onbtnclickevent and close current form here is my code

form1

private void btnInd_Click(object sender, EventArgs e)
        {
           
            Tab1  dlg = new Tab1(); // assume Form2 is the second form.
           dlg.ShowDialog();
          
            //tabl in new form
        }

and in tab1 onload

private void Tab1_Load(object sender, EventArgs e)
        {
            Form2 f2 = new Form2();
         f2.Close();
            
        }

tab1 formis opening but form2 is not closing

plzhelp
thanks
praveen

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by finito
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.