Results 1 to 8 of 8

Thread: How to shorten the string of file path? [Resolved]

Threaded View

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Location
    Klang, Selangor, Malaysia
    Posts
    163

    Question How to shorten the string of file path? [Resolved]

    I add an OpenFileDialog to my project.
    In order to identify the path of the file that I want to open, I added this code:
    Code:
    Dim strSourceFilename As String = OpenFileDialog.FileName
    As a result, strSourceFilename will show the file path. For example:
    C:\Documents and Settings\Tan\My Documents\Trainee\Payroll System\frmMain.vb
    How can I shorten the file path to look something like this:
    C:\Documents and Settings\.....\Payroll System\frmMain.vb
    I just want the string in the middle part be replaced by ".....", while the front part and the end part (file name) remain unchanged.

    How can I make it? please guide me. thank you.
    Last edited by albertlse; Aug 21st, 2003 at 08:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width