If RichTextBox.DetectUrls
is set to true, the control will automatically detect links from the protocol and create a link.
"My File: file://c:/MyFile.txt" will display the file:// part as a link.
The RichTextBox.LinkClicked
event is fired when the user clicks a link - and you can act on it as needed.
private void RichTextBox1OnLinkClicked(object sender, LinkClickedEventArgs e)
{
var filePath = new Uri(e.LinkText).AbsolutePath;
}