Create and Execute Web Links with the LinkLabel Control

Visual Basic .NET makes Web links easy with the LinkLabel control. You’ll find this control in the standard Visual Basic.NET Toolbox. Simply click on it, draw it on your form, and set the Text property to your desired URL. To navigate to the link, add the following code to the LinkClicked() event of the LinkLabel:

	System.Diagnostics.Process.Start _(LinkLabel1.Text)

The Start method of the Process class executes the application string to which you pass it. If you don’t supply an application to the method, the text you pass to it dictates which application the system launches. So, if you just pass it a URL, it opens it using Microsoft Internet Explorer.

The LinkLabel control comes equipped with quite a few properties to help you create the perfect Web link. For example, you can enter lines and lines of text into the control’s Text property. Then, use the LinkArea property and associated LinkArea Editor to select only the text you want for the link. You can also specify whether the text has a permanent underline, no underline, or an underline visible only when the user hovers over the link using the LinkBehavior property. The valid values for this property are SystemDefault, AlwaysUnderline, HoverUnderline, and NeverUnderline. For additional customization, change the default link color and visited link color using the LinkColor and VisitedLinkColor properties. You can even embed an image right into the link using the Image property.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS