imports System
imports System.Drawing
imports System.Windows.Forms
public class LinkLabelsLinkAdd : inherits Form
dim lnkMsft as LinkLabel
dim lnkLA as LinkLabel
public sub New()
Size = new Size(300,250)
lnkLA = new LinkLabel()
lnkLA.Parent = me
lnkLA.Text = "Liberty Associates"
lnkLA.Location = new Point(0,25)
lnkLA.AutoSize = true
lnkLA.BorderStyle = BorderStyle.None
lnkLA.Links.Add(0,17,"www.LibertyAssociates.com")
AddHandler lnkLA.LinkClicked, AddressOf lnkMsft_LinkClicked
end sub
public shared sub Main()
Application.Run(new LinkLabelsLinkAdd())
end sub
private sub lnkMsft_LinkClicked(ByVal sender as object, ByVal e as LinkLabelLinkClickedEventArgs)
lnkMsft.Links(lnkMsft.Links.IndexOf(e.Link)).Visited = true
System.Diagnostics.Process.Start(lnkMsft.Text)
end sub
end class
|