The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

VB.Net Rich Text links

HyoukoHyouko Registered User regular
edited December 2006 in Help / Advice Forum
Alright, a rather specific techy question here. I'm working in VB.Net on a project for my HCI class; said project involves use of the RichTextBox class. I know that the thing will let one put links in the text, because it has an OnLinkClicked method, but I haven't found the RTF escape sequence (or whatever may be needed) to signal a link. The links aren't going to be webpage links; I want to catch the link text in OnLinkClicked and use it to do various things within the program. What should I use?

--
All that is left to me is the sound of the snow underfoot.
Hyouko on

Posts

  • JaninJanin Registered User regular
    edited December 2006
    According to MSDN, RichTextBox has a 'DetectUrls' property. Setting it to true will highlight http://, ftp://, etc links.

    However, it doesn't appear possible to easily insert arbitrary link text. There's a page on The Code Project, which might help. Though, be aware that TCP often has pretty awful code in it.

    Janin on
    [SIGPIC][/SIGPIC]
  • HyoukoHyouko Registered User regular
    edited December 2006
    Thanks! It works nicely. Hopefully my prof won't mind its use in this project (fairest thing would really be to share it with other students - it provides a nicer solution to this problem than anything VB supports natively, from what I can see).

    Hyouko on
    --
    All that is left to me is the sound of the snow underfoot.
Sign In or Register to comment.