943,576 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 382
  • VB.NET RSS
Apr 10th, 2009
0

Displaying folder paths

Expand Post »
i have a file path shown below i intend to display file only;
C:\Users\densman\Documents\ImageUploader\Chickens1.jpg
is there a way to display [B]chickens1.jpg[/B instead of all the path??
Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
densman is offline Offline
15 posts
since Feb 2008
Apr 10th, 2009
0

Re: Displaying folder paths

String class helps you in that, just play with string coming to you...
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 10th, 2009
0

Re: Displaying folder paths

Use a FileInfo class:
VB.NET Syntax (Toggle Plain Text)
  1. Imports System.IO
  2. Public Class Form1
  3. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4. Dim file As New FileInfo _("C:\Users\densman\Documents\ImageUploader\Chickens1.jpg")
  5. TextBox1.Text = file.Name
  6. End Sub
  7. End Class
Last edited by waynespangler; Apr 10th, 2009 at 12:31 pm.
Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Problem in installation of setup project in window server 2008
Next Thread in VB.NET Forum Timeline: FLV Player Component





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC