Represents a link within a LinkLabel control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Initializes a new instance of theclass.
Initializes a new instance of the LinkLabel.class with the specified starting location and number of characters after the starting location within the
|LinkLabel.Link(Int32, Int32, Object)|
Initializes a new instance of the LinkLabel, and the data associated with the link.class with the specified starting location, number of characters after the starting location within the
Gets or sets a text description of the link.
Gets or sets a value indicating whether the link is enabled.
Gets or sets the number of characters in the link text.
Gets or sets the data associated with the link.
Gets or sets the name of the.
Gets or sets the starting location of the link within the text of the LinkLabel.
Gets or sets the object that contains data about the.
Gets or sets a value indicating whether the user has visited the link.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
The LinkLabel control. You can use these properties to provide data to the LinkClicked event of the LinkLabel control to perform tasks when the link is clicked in the control. The LinkData property enables you to define information that the LinkClicked event can use to display a URL within Microsoft Internet Explorer or to open a file.class defines the properties of a link within a
In addition to information related to the link, the properties of the Start and Length properties define the location and length of text from the text of the LinkLabel control to display as a link. The Enabled property allows you to display the link as a disabled link, and the Visited property can alert the user that they already visited the specified link in the current instance of the LinkLabel.class also help define the text of the and its display state. The
You can display multiple links in a single LinkLabel control. Each is added into the LinkLabel.LinkCollection associated with the LinkLabel control. To obtain the collection of links defined in a LinkLabel control, use the LinkLabel.Links property.
The following example demonstrates using the LinkLabel class, with multiple LinkArea sections defined, to display a label on a form. The example demonstrates setting the AutoSize, LinkBehavior, DisabledLinkColor, LinkColor, and VisitedLinkColor properties to customize the look of the LinkLabel. The first LinkArea is specified using the LinkLabel.LinkArea property. Additional links are added to the LinkLabel using the LinkLabel.LinkCollection.Add method. The example handles the LinkClicked event by starting the Web browser for hyperlinks, and displaying a MessageBox for other links.
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.