ListBox Code to ListView!
This is a code made for a listbox in vb.net but I can not convert it to use with a listview cause listview does not have selectedindex. I need help converting this.
Code:
Dim str As String = Web.DownloadString("")
If ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then
Dim x1 As Integer = str.IndexOf(ListBox1.SelectedItem, 0) + ListBox1.SelectedItem.ToString.Length + 1
Dim MJ As String = Mid(str, x1).Trim
TextBox1.Text = MJ
Else
Dim x1 As Integer = str.IndexOf(ListBox1.SelectedItem, 0) + ListBox1.SelectedItem.ToString.Length + 1
Dim x2 As Integer = str.IndexOf(ListBox1.Items(ListBox1.SelectedIndex + 1), x1) + 1
Dim MJ As String = Mid(str, x1, x2 - x1).Trim
TextBox1.Text = MJ
End If



dunno..