raviinfosys77
New member
I have a sample file in which it has a browse button, a checkedlistbox, and two radio buttons. You can see the screen-shot below.
Whenever I click on the browse button.... the PDF files are shown in the checked list box.
Here is the code behind the browse button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Browse.Click
Dim f As New FolderBrowserDialog
f.ShowDialog()
If f.SelectedPath = "" Then Exit Sub
Inputbox.Text = f.SelectedPath
If Inputbox.Text.Length = 0 Then Exit Sub
For Each File As String In Directory.GetFiles(Inputbox.Text)
If File.ToLower.EndsWith(".pdf") Then
CheckedListBox1.Items.Add(File)
End If
Next
End Sub
But I have to make one more option ... I cant figure out how to make it....???
The problem is that there are two radio buttons named Select All and Select none respectively.
I have to write a code so that whenever the select all option is selected... All files in the checkedlistbox should be selected.....
and whenever the Select none option is selected... Al the files in the checkedlistbox should be deselected....
that's the case ... I just cant figure out how to do this since I am new to VB.NET....
Thanks in advance.....
Whenever I click on the browse button.... the PDF files are shown in the checked list box.
Here is the code behind the browse button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Browse.Click
Dim f As New FolderBrowserDialog
f.ShowDialog()
If f.SelectedPath = "" Then Exit Sub
Inputbox.Text = f.SelectedPath
If Inputbox.Text.Length = 0 Then Exit Sub
For Each File As String In Directory.GetFiles(Inputbox.Text)
If File.ToLower.EndsWith(".pdf") Then
CheckedListBox1.Items.Add(File)
End If
Next
End Sub
But I have to make one more option ... I cant figure out how to make it....???
The problem is that there are two radio buttons named Select All and Select none respectively.
I have to write a code so that whenever the select all option is selected... All files in the checkedlistbox should be selected.....
and whenever the Select none option is selected... Al the files in the checkedlistbox should be deselected....
that's the case ... I just cant figure out how to do this since I am new to VB.NET....
Thanks in advance.....