Creating windows application using C#
-
Hi everyone Can anyone help me out with this... In a windows application, i have got 2 windows forms. And i wan to link the forms together with a link label in the first form. How do i go about writing the codes? Thanks in advance :)
frossie
-
i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!
frossie
-
Hi everyone Can anyone help me out with this... In a windows application, i have got 2 windows forms. And i wan to link the forms together with a link label in the first form. How do i go about writing the codes? Thanks in advance :)
frossie
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Form2 form2 = new Form2();form2.Show(); //or form2.ShowDialog();
}
-
i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!
frossie
-
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Form2 form2 = new Form2();form2.Show(); //or form2.ShowDialog();
}
-
Oh ic.. it works! haha thanks! Btw, what's the difference between form2.show and form2.showdialog? I mean i tried with both but i can't spot any visible difference..can u explain in some simple terms? hehe.
frossie
With form2.ShowDialog() form2 must be closed before any other window will be active, with form2.Show() you will be able to work in any window.
-
i created 2 forms in a project. 2 forms namely, form1 and form2. form1 uses a linklabel control (System.Windows.Forms.LinkLabel) to open up form 2. So when i click on this text "open form 2" which is the link label, it should open up the windows form2. SOrry but i don't really know how to explain in much detail, hope the above helps abit...thanks!
frossie