Private Class clsItemFavorite Inherits ListViewItem Public Property LinkURL Public Sub New(ByVal Title As String, ByVal LinkURL As String) MyBase.New(Title) Me.LinkURL = LinkURL End Sub End Class Public Sub New() ' この呼び出しはデザイナーで必要です。 InitializeComponent() ' InitializeComponent() 呼び出しの後で初期化を追加します。 ReadFavorites() End Sub Private Sub ReadFavorites() Dim dirFav As New DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Favorites)) ListView1.Items.Clear() For Each objFile In dirFav.GetFiles("*.URL", SearchOption.AllDirectories) Dim strLines = File.ReadAllLines(objFile.FullName) Dim strURL = "" For Each strLine In strLines If strLine.StartsWith("URL=") Then strURL = strLine.Substring(4) End If Next Dim itm As New clsItemFavorite(objFile.Name.Replace(objFile.Extension, ""), strURL) ListView1.Items.Add(itm) Next End Sub Private Sub ListView1_ItemActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.ItemActivate If ListView1.SelectedItems.Count > 0 Then Dim itm = DirectCast(ListView1.SelectedItems(0), clsItemFavorite) WebBrowser1.Navigate(itm.LinkURL) End If End Sub