lothos12345 Posted July 18, 2005 Posted July 18, 2005 I have an rtf that is filled with text from a database. Every so often a hyper is in the text and the rtf detects the hyperlink and it looks like a hyper link however when you click on it nothing happens not sure why. This is a visual basic.NET application. Any help would be greatly appreciated. Quote
Simcoder Posted July 18, 2005 Posted July 18, 2005 Private Sub RichTextBox1_LinkClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.LinkClickedEventArgs) Handles RichTextBox1.LinkClicked System.Diagnostics.Process.Start(e.LinkText) End Sub -=Simcoder=- Quote Whatever thy hand findest to do, do it with all thy heart - Jesus
Leaders Iceplug Posted July 18, 2005 Leaders Posted July 18, 2005 RTF (rich text format) is a text format. RTB (rich text box) is the box that holds the RTF. To catch the link clicking inside of the RTB, you have to handle the RTB's LinkClicked event. In the LinkClicked event, the e.LinkText contains the hyperlink URL. With this URL, you call System.Diagnostics.Process.Start(the url goes here) and it will popup the default browser to this webpage. Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.