i have code for filling a listbox with files with a specified extension(in this case, jpg files)
Imports System
Imports System.IO
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
'Get jpg files
Dim dirs As String() = Directory.GetFiles("c:\dave\", "*.jpg")
Dim dir As String
'Add file paths and filenames to the listbox
For Each dir In dirs ListBox1.Items.Add(dir)
Next
Catch ex As Exception
End Try
End Sub
--------------------------------------------
i'm thinking there's a way to do a similar thing using the listview.
i want to load image files into the listview. first column contains the filename, the next should contain the extension,the next the image size(pixels) and the last column should contain file size. pls help.
Imports System
Imports System.IO
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
'Get jpg files
Dim dirs As String() = Directory.GetFiles("c:\dave\", "*.jpg")
Dim dir As String
'Add file paths and filenames to the listbox
For Each dir In dirs ListBox1.Items.Add(dir)
Next
Catch ex As Exception
End Try
End Sub
--------------------------------------------
i'm thinking there's a way to do a similar thing using the listview.
i want to load image files into the listview. first column contains the filename, the next should contain the extension,the next the image size(pixels) and the last column should contain file size. pls help.