Public Class Form1

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        LinkLabel1.Text = "Visit Microsoft"

        LinkLabel1.ActiveLinkColor = Color.Coral

        LinkLabel1.VisitedLinkColor = Color.DarkGreen

        LinkLabel1.LinkArea = New LinkArea(0, 16)

 

        LinkLabel2.Text = "Some Work"

        LinkLabel2.ActiveLinkColor = Color.Coral

        LinkLabel2.VisitedLinkColor = Color.DarkBlue

        LinkLabel2.LinkArea = New LinkArea(0, 16)

 

    End Sub

 

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked

        Try

            visitMicrosoft()

            LinkLabel1.LinkVisited = True

        Catch ex As Exception

            MsgBox("The connection could not be estabilished. Check if your internet connection is available!")

        End Try

    End Sub

    Private Sub visitMicrosoft()

        System.Diagnostics.Process.Start("http://www.microsoft.com")

    End Sub

 

    Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked

        Try

            MsgBox("Some other activity")

            LinkLabel2.LinkVisited = True

        Catch ex As Exception

 

        End Try

    End Sub

  

End Class