LinkLabel控件

新建windows窗体应用程序,添加两个Windows窗体,Form1和Form2,Form1添加LinkLabel控件,双击LinkLabel控件,编辑点击事件如下:
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form2 frm = new Form2();
            frm.Show();
            linkLabel1.LinkVisited = true;
        }
运行即可。

版权声明:

原文地址:https://www.cnblogs.com/walccott/p/4957117.html