Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 3rd, 2007, 06:59 AM
Authorized User
 
Join Date: Nov 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to djobes31770 Send a message via Yahoo to djobes31770
Default File Listings

I am new to VB, and i have been trying to get a file listing of a report directory, I can get the listing, but it displays

ListView:(Filename).

I pieced together the code from online books and online help, and i removed the ListView References, but it still displays.

Code:
' Populate the ListView.Items property.
        ' Set the directory to the sample picture directory.
        Dim dirInfo As New System.IO.DirectoryInfo("Z:\Development\IaTrack-Beta" & "\xml-reports")
        Dim file As System.IO.FileInfo

        ' Get the html files from the directory
        Dim files() As System.IO.FileInfo = dirInfo.GetFiles("*")

        ' Add each file name and full name including path
        ' to the ListView.
        If Not (files Is Nothing) Then
            For Each file In files
                Dim item As New ListViewItem(file.Name)
                item.SubItems.Add(file.FullName)
                lstFiles.Items.Add(item)
            Next
        End If





Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Text file and convert to Binary file VB.net sjlsysprg1 Pro VB.NET 2002/2003 4 June 29th, 2007 06:53 AM
How to display .tif file, .pdf file and .jpg file phuong171 ASP.NET 1.0 and 1.1 Basics 1 March 13th, 2007 07:29 AM
help-lost my wrox-Prof.PHP4-book listings udix Beginning PHP 0 September 16th, 2006 10:44 AM
Birth Date listings xp_mahesh JSP Basics 0 June 2nd, 2006 12:57 AM
SQL 2000 database / text file / binary file pallone Javascript How-To 3 January 28th, 2005 01:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.