* kumar kss <ks**********@h otmail.com> scripsit:
Thanks for your valid suggestion. It is working fine with your idea.
But, I have one more doubt, I gave the commend to create the link like
this,
rtbTest.Text = @"file:/c:\Test.mdb";
in the output along with the file name "file:/" also display as a link.
So I have to remove it before use the LinkText to the process.
Is there any way to display the file name alone as a link?
Add a LinkLabel control to your form, then add this code:
\\\
Me.LinkLabel1.T ext = "Besuchen Sie mich in Berlin oder Hamburg!"
Me.LinkLabel1.L inks.Add(21, 6, "http://www.berlin.de")
Me.LinkLabel1.L inks.Add(33, 7, "http://www.hamburg.de" )
..
..
..
Private Sub LinkLabel1_Link Clicked(ByVal sender As Object, ByVal e As System.Windows. Forms.LinkLabel LinkClickedEven tArgs) Handles LinkLabel1.Link Clicked
Process.Start(e .Link.LinkData)
End Sub
///
You can try to get the filename using 'System.IO.Path .GetFileName'.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet/>