| | |
Listview text problem
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 20
Reputation:
Solved Threads: 0
hi,
i am basically adding files to my listview through this code
so all the files inside testing folder show up on the listview
the problem is that they all show up but they show up with the path such as instead of showing test.txt, they would show C:\Testing\test.txt
can anyone please tell me how to only show the filename and not the whole path
any help will be appreciated
i am basically adding files to my listview through this code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
For each n as string in my.computer.filesystem.getdirectories("C:\Testing\") Listview1.items.add(n,Imagelist1.images.count - 1) Next
the problem is that they all show up but they show up with the path such as instead of showing test.txt, they would show C:\Testing\test.txt
can anyone please tell me how to only show the filename and not the whole path
any help will be appreciated
Last edited by saurabh.verma; Apr 28th, 2008 at 7:10 pm.
Hi
This is VB.NET code, I think so.
Try
I Dont know whether it is right or wrong. Please try it
This is VB.NET code, I think so.
Try
For each n as string in my.computer.filesystem.getdirectories("C:\Testing\")
n.Replace ( "C:\Testing\", "" )
Listview1.items.add(n,Imagelist1.images.count - 1)
Next if this thread for .net please post in vb.net section.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
Try This
I Think Strings are Immutable
Dim NewString as String
For each n as string in my.computer.filesystem.getdirectories("C:\Testing\")
NewString = n.Replace ( "C:\Testing\", "" )
Listview1.items.add(NewString,Imagelist1.images.count - 1)
NextI Think Strings are Immutable
Selva ![]() |
Similar Threads
- problem in making listview (Visual Basic 4 / 5 / 6)
- multiple ghost images with custom ListView (C#)
- Problem with Listview (VB.NET)
- Problems instering items into a listview (VB.NET)
- Problems in serializing listView&treeView items in Visual C++ 2005 Express Edition (C++)
- VB.Net: Problem Retrieve data from ListView (VB.NET)
- Searching Function at listview by using VB.Net (VB.NET)
- TreeListView problem (C)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Crystal Report + Stored Procedure returns no data
- Next Thread: disable NIC card using vb
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
6 429 2007 access activex add age append application basic beginner birth c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






