Search code examples
c#hyperlinklabellinklabel

Link Label in Windows form application C#


Hello everyone I'm making a school project and I'm making a simple application using windows form application in C#.

My question is can I link a link label with another form in my project so when I press the link label it directs me in the another form(window),and if yes which code should I use.

Thanks


Solution

  • Something like this?

    private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
            Form2 newForm = new Form2();
            newForm.ShowDialog();
    }