By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,748 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,748 IT Pros & Developers. It's quick & easy.

Populating a listbox

P: n/a

Hi any1 know how to populate a listbox from a textfile using split plz
10x alot

Below a code extract

Private Sub LoadAlbum()
With ofdAlbum
.DefaultExt = "txt"
.InitialDirectory = "C:\Documents and Settings\Stefan\M
Documents\My Pictures\My Album\"
.Filter = "Text files | *.txt"
.ShowDialog() 'get the filename of the picture the use
End With

Dim FileName As String = IO.Path.GetFileName(ofdAlbum.FileName
'Getting the Filename
Dim FolderPath As String = ofdAlbum.InitialDirectory
'Establishing the Folder path
Dim StrReader As New StreamReader(FolderPath & FileName
'Enables to upload a textfile album
Dim EndOfFile, CurrentPhoto, i As Integer
Dim IndexFile As String
Dim SplitIndexFile, SplitPictureInfo As String()
IndexFile = StrReader.ReadToEnd
SplitIndexFile = IndexFile.Split("|")
EndOfFile = SplitIndexFile.Length - 3
lstImages.Items.Clear() 'clears the list bo

EkokuPosted from newsgroup acces

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"Ekoku" <Ekoku.1shi1a@> schrieb:
Hi any1 know how to populate a listbox from a textfile using split plz?
SplitIndexFile = IndexFile.Split("|")


M S Herfried K. Wagner
M V P <URL:>
V B <URL:>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.