🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3551

Re: [VB.NET] Listbox vullen met file's zonder Path???

#3551
From: Muse
Date: Tue, 02 Dec 2003 01:22
35 lines
2168 bytes
"Dr.Ruud" <'t.leven.is.fijn@life.i$.great> schreef in bericht
news:bqgr06.e0.1@news.isolution.nl...
> Toen ik Muse kietelde, kwam er dit uit:
>
> > de volgende fout: Value of type 'String' cannot be converted to
> > '1-dimensional array of String'.
> >
> >         Dim sFiles() As String
> >         Dim i As Integer
> >         sFiles = System.IO.Path.GetFileName("d:\")
> >         For i = 0 To UBound(sFiles)
> >             ListBox1.Items.Add(sFiles(i))
> >         Next
>
> Ongeveer zo:
>
>      Dim sFiles() As String, i As Integer, s As String
>      sFiles = System.IO.Directory.GetFiles("d:\", "*.doc")
>      For i = LBound(sFiles) To UBound(sFiles)
>        s = System.IO.Path.GetFileName(sFiles(i))
>        ListBox1.Items.Add(s)
>      Next
>
> Die 's' is natuurlijk niet per se nodig.
>
> -- 
> Affijn, Ruud
>
>

THNX het werkt.

Mvg,
Robert van de Vijver.
Technical Details
Message-ID: <3fcbe946$0$41750$5fc3050@dreader2.news.tiscali.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed.news.tiscali.de!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail
References: <3fcbaeb3$0$41757$5fc3050@dreader2.news.tiscali.nl> <mOOyb.870$7U1.1577@amstwist00> <3fcbcc62$0$41761$5fc3050@dreader2.news.tiscali.nl> <bqgr06.e0.1@news.isolution.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 107324,94aed5b5e6071ccd
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,a0673d72800dda82
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-12-01 17:22:51 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed.news.tiscali.de!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail
From: "Muse" <vandevijver@no_spam@quicknet.nl>
Newsgroups: be.comp.programming,nl.comp.programmeren
References: <3fcbaeb3$0$41757$5fc3050@dreader2.news.tiscali.nl> <mOOyb.870$7U1.1577@amstwist00> <3fcbcc62$0$41761$5fc3050@dreader2.news.tiscali.nl> <bqgr06.e0.1@news.isolution.nl>
Subject: Re: [VB.NET] Listbox vullen met file's zonder Path???
Date: Tue, 2 Dec 2003 02:22:49 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1165
Lines: 37
Message-ID: <3fcbe946$0$41750$5fc3050@dreader2.news.tiscali.nl>
Organization: Tiscali bv
NNTP-Posting-Date: 02 Dec 2003 02:22:14 CET
NNTP-Posting-Host: 82.168.35.139
X-Trace: 1070328134 dreader2.news.tiscali.nl 41750 82.168.35.139:24577
X-Complaints-To: abuse@tiscali.nl