Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Posted


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=-

Whatever thy hand findest to do, do it with all thy heart - Jesus
  • Leaders
Posted

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.

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...