|
-
Jun 30th, 2004, 06:15 PM
#1
Thread Starter
Member
listview small images display???
I can't seem to make my images display.
Here is my code.
*****************************************************
Dim fDir As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("\\dns1\Faxes$\")
Dim File As System.IO.FileInfo
Dim lItems As ListViewItem
Dim smallImages As New ImageList
smallImages.Images.Add(Bitmap.FromFile("c:\sheet.ico"))
Me.ListView1.SmallImageList = smallImages
Try
If (fDir.Exists = False) Then
Console.WriteLine("File path is not valid. Please specify a valid path.")
Else
For Each File In fDir.GetFiles()
lItems = Me.ListView1.Items.Add(Fax.Name)
lItems.SubItems.Add(File.CreationTime)
lItems.SubItems.Add(File.LastAccessTime)
lItems.SubItems.Add((File.Length / 1000) & " KB")
Next
End If
Catch ex As Exception
Console.WriteLine("The process failed.", ex.ToString)
End Try
Can someone please tell me what I'm doing wrong?
Thanks!!
-
Jun 30th, 2004, 07:55 PM
#2
Fanatic Member
-
Jun 30th, 2004, 11:50 PM
#3
Thread Starter
Member
That worked great thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|