Like it

Saturday, July 9, 2011

Hyperlink Control in Windows Forms (VB.NET) Application

How to use Hyperlinks on WinForms (VB.NET)

Create a small Windows Forms like the one below and add LinkLabel Control on the form:


Add the following code to the LinkLabel's LinkClicked event:

Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked 
System.Diagnostics.Process.Start("www.google.com") 
End Sub


This will open the website in a new IE window


No comments:

Post a Comment