Public Class Form1
Dim Link_ As New LinkLabel
Dim Proc As Process
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
If Me.TextBox1.TextLength = 0 Then Exit Sub
If Me.TextBox2.TextLength = 0 Then Exit Sub
Link_ = New LinkLabel With {.Text = Me.TextBox1.Text, .Tag = TextBox2.Text}
Me.ListBox1.Items.Add(Link_)
End Sub
Private Sub ListBox1_DoubleClick(sender As Object, e As System.EventArgs) Handles ListBox1.DoubleClick
Dim Item As LinkLabel = ListBox1.SelectedItem
If Item Is Nothing Then Exit Sub
Proc = Process.Start(Item.Tag.ToString)
End Sub
Private Sub ListBox1_DrawItem(sender As System.Object, e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem
If e.Index = -1 Then Exit Sub
Dim Item As LinkLabel = ListBox1.Items(e.Index)
e.DrawBackground()
e.Graphics.DrawString(Item.Text, e.Font, New SolidBrush(e.ForeColor), e.Bounds.X + 1, e.Bounds.Y)
End Sub
End Class
Download Project Source Code[
^]