RichTextBox - Open Detect URLs
Use this board to post your code snippets - tips and tricks
5 posts
Page 1 of 1
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;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Can't you just use:
Code: Select all
Process.Start("e.LinkText")
Hello Nery,
Yes you can, either way does the same job cooll; .
Thank you.
Yes you can, either way does the same job cooll; .
Thank you.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
I knew it, it's just way more simple which means you can call the same action with a smaller piece of code. ^_^
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023