RichTextBox - Open Detect URLs
Posted: Sat Sep 19, 2009 11:58 am
Hello,
A quick snip to show you how to launch a webpage from a link inside a richtextbox control. First you need to set the "DetectUrls" propertie to 'True' which will make URL text placed inside a richtextbox clickable.
Then use this code in the "RichTextBox LinkClicked" event:
To open in specific webbrowser:
Its here just incase anyone needs it.
Happy coding cooll;
A quick snip to show you how to launch a webpage from a link inside a richtextbox control. First you need to set the "DetectUrls" propertie to 'True' which will make URL text placed inside a richtextbox clickable.
Then use this code in the "RichTextBox LinkClicked" event:
To open in specific webbrowser:
Code: Select all
To open in default webbrowser:
System.Diagnostics.Process.Start("iexplore.exe", e.LinkText)
Code: Select all
- credit to robby1998 for the default linkSystem.Diagnostics.Process.Start(e.LinkText)
Its here just incase anyone needs it.
Happy coding cooll;