Johnny5 Posted August 24, 2003 Posted August 24, 2003 I hava file "C:\\road.dll". I need my program to get its name to the textbox in VB.net. Please help if you can. Thank you.:) Quote
AndreRyan Posted August 24, 2003 Posted August 24, 2003 If it's called "road.dll" then you'd just set the textbox.Text to "road.dll". You need to be more specific about what you want, if you know the dll name then asking how to get the name seems to be a bit pointless Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Johnny5 Posted August 24, 2003 Author Posted August 24, 2003 Correctly: I have a folder with .bmp files. And I need to put all this .bmp's(names of bmp's) to the LISTBOX... Help Please.:rolleyes: Quote
Johnny5 Posted August 24, 2003 Author Posted August 24, 2003 ...and when i paste in this folder any .bmp file, this file must be in listbox after reflesh... Quote
Administrators PlausiblyDamp Posted August 24, 2003 Administrators Posted August 24, 2003 Something similar to the following should do it. dim bmps() as string bmps = System.Io.Directory.GetFiles(, "*.bmp") ListBox1.Datasource=bmps Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Johnny5 Posted August 24, 2003 Author Posted August 24, 2003 Thank YOU! It was that thing I need :) Quote
mrdutchie Posted December 24, 2003 Posted December 24, 2003 This works great, except I can't figure out how to get rid of the whole programpath? Everything in the listbox shows as "C:\program files\Test Application\Forms\Reports\filename.xxx I just want the filename.xxx to show up Quote
Leaders dynamic_sysop Posted December 24, 2003 Leaders Posted December 24, 2003 to get just the file name / extension. Dim strFiles As String() = IO.Directory.GetFiles("C:\", "*.bmp") Dim strBmp As String For Each strBmp In strFiles Dim strName As New IO.FileInfo(strBmp) '/// this will return the name only ( eg: mybmp.BMP ) Console.WriteLine(strName.Name) Next Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.