Feeling lonely and content at the same time, I believe, is a rare kind of happiness
2. Je zou een ListBox kunnen gebruiken, en die zelf vullen met een Dir$ loopje.
4200Wp ZO + 840Wp ZW + 1680Wp NW | 14xIQ7+ + 1xDS3-L | MTVenusE | HWP1
Feeling lonely and content at the same time, I believe, is a rare kind of happiness
Verwijderd
Feeling lonely and content at the same time, I believe, is a rare kind of happiness
Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'
Zou je iets uitgebreider uit kunnen leggen wat je precies probeert te doen?
Don't try... do. Or do not. There is no try. -- Master Yoda
ben dus bezig met een twilight achtig menu.
en aangezien ik nog niet veel snap van databases in vb6, haal ik de gegevens uit txt bestanden.
en die kan je dus via een filelist openen. Die txt bestanden geef ik meteen de naam van het programma zodat als die extensies wegzijn het gewoon voor de eindgebruiker een software lijst lijkt.
dus mn vraag, is er een custom control dan om dit voor elkaar te krijgen, ofJohnwoo zou je jou manier misschien in een stukje code kunnen plaatsen?
/update
Screenshotje. De grijze balk links is zoals je ziet de filelist
/update
screenshot weggehaald, probleem solved.
[ Voor 0% gewijzigd door Aphelion op 14-10-2002 11:37 . Reden: Schreenshot ]
Feeling lonely and content at the same time, I believe, is a rare kind of happiness
Even uit de losse pols:Maurice schreef op 14 oktober 2002 @ 09:53:
hmm zou je een stukje voorbeeld code kunnen typen van hoe ik dan die txt files in die map zonder extensie in een ListBox krijg ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| Public Sub MakeFileList(lstBox As ListBox, ByVal Path As String) ' Vul een ListBox met filenames Dim File As String lstBox.Clear File = Dir$(Path) While File <> "" lstBox.Add GetFileFromPath(File) File = Dir$ Wend End Sub Private Function GetFileFromPath(ByVal Path As String) As String ' Strip het pad en de extensie van de filename Dim Pos As Integer Pos = InStrRev(Path, "\") If Pos Then Path = Mid$(Path, Pos + 1) Pos = InStrRev(Path, ".") If Pos Then Path = Left$(Path, Pos - 1) GetFileFromPath = Path End Function |
Gebruiksaanwijzing: sleur een ListBox op je form. Op het moment dat je em wilt vullen (in jouw geval waarschijnlijk maar een keer, in je Form_Load event) roep je MakeFileList aan, bijvoorbeeld:
1
2
3
| Private Sub Form_Load() MakeFileList lstFiles, "C:\blaat\*.*" End Sub |
Oeps, ik zat nog met de foldertree uit een ander topic in mn kop en had de file variabele Folder genoemd
4200Wp ZO + 840Wp ZW + 1680Wp NW | 14xIQ7+ + 1xDS3-L | MTVenusE | HWP1
ey hardstikke bedankt! even kijken of ik eruit kom.!johnwoo schreef op 14 oktober 2002 @ 11:01:
[...]
Even uit de losse pols:
Visual Basic .NET:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Public Sub MakeFileList(lstBox As ListBox, ByVal Path As String) ' Vul een ListBox met filenames Dim Folder As String lstBox.Clear Folder = Dir$(Path) While Folder <> "" lstBox.Add GetFileFromPath(Folder) Folder = Dir$ Wend End Sub Private Function GetFileFromPath(ByVal Path As String) As String ' Strip het pad en de extensie van de filename Dim Pos As Integer Pos = InStrRev(Path, "\") If Pos Then Path = Mid$(Path, Pos + 1) Pos = InStrRev(Path, ".") If Pos Then Path = Left$(Path, Pos - 1) GetFileFromPath = Path End Function
Gebruiksaanwijzing: sleur een ListBox op je form. Op het moment dat je em wilt vullen (in jouw geval waarschijnlijk maar een keer, in je Form_Load event) roep je MakeFileList aan, bijvoorbeeld:
Visual Basic .NET:
1 2 3 Private Sub Form_Load MakeFileList lstFiles, "C:\blaat\*.*" End Sub
Feeling lonely and content at the same time, I believe, is a rare kind of happiness
1
2
3
4
5
| Dim I as Long,lngPos as long For I = 0 to file1.listcount -1 lngpos = instrrev(1,file1.list(i),".") if lngpos > 0 then list1.additem left$(file1.list(i),lngpos-1) Next I |
(ook uit losse pols
Al is deze methode niet echt gewaardeerd denk ik, zelf zou ik hem ook grotendeels afraden
Als je probs hebt, ik ben ook VB progger dus je kan altijd dingen vragen via Messenger
Unix doesn't prevent a user from doing stupid things, because that would necessarily prevent them from doing brilliant things.
while true ; do echo -n "bla" ; sleep 1 ; done
jo oke fijn om te weten, thanx hey!Demoniac schreef op 14 oktober 2002 @ 11:17:
Ey Maurice
Als je probs hebt, ik ben ook VB progger dus je kan altijd dingen vragen via Messenger
en woo, het werkt, hardstikke bedankt!
Feeling lonely and content at the same time, I believe, is a rare kind of happiness