mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 17:16:03 +02:00
* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
1.7 KiB
1.7 KiB
title, ms.date, dev_langs, f1_keywords, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | f1_keywords | helpviewer_keywords | ms.assetid | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Display Web Page from LinkLabel Control (Visual Basic) | 03/30/2017 |
|
|
|
477a7398-5971-4de3-b24c-f49f32bdb28a |
How to: Display a Web Page from a Windows Forms LinkLabel Control (Visual Basic)
This example displays a Web page in the default browser when a user clicks a Windows Forms xref:System.Windows.Forms.LinkLabel control.
Example
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
LinkLabel1.Text = "Click here to get more info."
LinkLabel1.Links.Add(6, 4, "www.microsoft.com")
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal _
e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles _
LinkLabel1.LinkClicked
System.Diagnostics.Process.Start(e.Link.LinkData.ToString())
End Sub
Compiling the Code
This example requires:
-
A Windows Form named
Form1. -
A xref:System.Windows.Forms.LinkLabel control named
LinkLabel1. -
An active Internet connection.
.NET Framework Security
The call to the xref:System.Diagnostics.Process.Start%2A method requires full trust. For more information, see xref:System.Security.SecurityException.