|
-
Jan 11th, 2008, 11:58 AM
#1
Thread Starter
New Member
[RESOLVED] VB simple query (I think)
Hello all, I'm just new on here and I thought that some of you guys might be able to help me out with something thats been confusing me for a while now...
Ok basically I'm using VB.net to create a program and part of it's functionality requires a combo box to be populated by titles of files from a directory on my hard drive. That bit has been done using this :
Me.cbo_user.DataSource = New System.IO.DirectoryInfo("E:\Pics\").GetFiles("*.jpg")
All works fine, combo box is successfully populated but the thing I'm struggling with is finding out how to remove the .jpg file extension from every item that is added to the combo box. I have been able to remove the extension using :
Me.cbo_user.Text = cbo_user.Text.Substring(0, cbo_user.Text.Length - 4)
Problem with this is, obviously it only removes the extension from the currently selected item, whereas I want the entire list "extension free"
Any help would be much appreciated, cheers.
Robin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|