private void Form1_Load(object sender, EventArgs e)
{
this.lnkTest.Text = "百度 Google Yahoo";
this.lnkTest.Links.Add(0, 2, "http://www.baidu.com");
this.lnkTest.Links.Add(3, 6, "http://www.google.com");
}
private void lnkTest_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
this.lnkTest.Links[lnkTest.Links.IndexOf(e.Link)].Visited = true;
string target = e.Link.LinkData as string;
if (target!=null && target.StartsWith("http://"))
{
System.Diagnostics.Process.Start(target);
}
else
{
MessageBox.Show("Item clicked: " + target);
}
}
打开App,阅读手记