How To Use Listview?
I tray To make Download Link Checker .,
My Project is :-
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
strFileName = OpenFileDialog1.FileName
Label1.Text = strFileName
Dim strm As System.IO.Stream
strm = OpenFileDialog1.OpenFile()
TextBox2.Text = OpenFileDialog1.FileName.ToString()
If Not (strm Is Nothing) Then
'insert code to read the file data
strm.Close()
Dim filepath As String = OpenFileDialog1.FileName
Dim inputstream As New IO.StreamReader(filepath)
Dim newstr(2) As String
Dim no As String
Dim links As String
Do While inputstream.Peek <> -1
newstr = inputstream.ReadLine().Split("*")
links = newstr(0)
no = newstr(1)
Me.lb1.Items.Add(links)
Me.lb1.Items.Item(lb1.Items.Count - 1).SubItems.Add(no)
Loop
inputstream.Close()
End If
End Sub
Private Sub LoadLinksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadLinksToolStripMenuItem.Click
strfilename = TextBox1.Text
OpenFileDialog1.Title = "Please Select a File"
OpenFileDialog1.InitialDirectory = Environment.SpecialFolder.DesktopDirectory
OpenFileDialog1.Filter = "(*.txt)|*.txt"
OpenFileDialog1.ShowDialog()
End Sub
Private Sub ListView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lb1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
cms1.Show(Cursor.Position)
End If
End Sub
Private Sub Show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Show.Click
If Hide.Visible = False Then
Show.Hide()
Hide.Show()
End If
End Sub
Private Sub Hide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hide.Click
If Show.Visible = False Then
Hide.Hide()
Show.Show()
End If
End Sub
I mad this Codes. For My Project,
my Project's 1st Step IS -
#1 - Load Your .txt Files via openfiledialog then Links are View In ListView1 Line by line
#2 - Click on Start Button Then textbox1.text = Listview's 1st link.Result show in webbrowser1.
#3 - If Link working? then link's checkbox.checked = true
#4 - Last step = Save all Checked links in text file save on
"C:\"
and i traying to make it autometic ,,,,,
please Help me , God Help You!
View This Step's



Help Me Please ,, God Help You!----B7vks

New Topic/Question
Reply




MultiQuote



|