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:
As a result, strSourceFilename will show the file path. For example:Code:Dim strSourceFilename As String = OpenFileDialog.FileName
How can I shorten the file path to look something like this:C:\Documents and Settings\Tan\My Documents\Trainee\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.C:\Documents and Settings\.....\Payroll System\frmMain.vb
How can I make it? please guide me. thank you.




Reply With Quote