Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Strings with hyperlinks

Strings with hyperlinks

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tibmark
    wrote on last edited by
    #1

    How can i create a long string with a hyperlink(different colored text) in the middle of the string and draw it to the form? I am trying to make it so that when I write the string I can set the link with a key word.. eg... String = "This is my string, so click here". can anybody help? Mark Thibodeaux

    J 1 Reply Last reply
    0
    • T tibmark

      How can i create a long string with a hyperlink(different colored text) in the middle of the string and draw it to the form? I am trying to make it so that when I write the string I can set the link with a key word.. eg... String = "This is my string, so click here". can anybody help? Mark Thibodeaux

      J Offline
      J Offline
      Joshua Quick
      wrote on last edited by
      #2

      Try using a LinkLabel control. You can setup this control to show both normal text and a link. It can even display multiple links within its text. But you can't add the link from the designer. It must be done in code. myLink.Text = "This is my string, so click here" Const linkString As String = "here" myLink.Links.Add(myLink.Text.IndexOf(linkString), linkString.Length) -- modified at 20:54 Monday 16th January, 2006 Let me rephrase this a little. The text you enter into a LinkLabel in the form designer will become one big link, which is not what you want. If you want to embed a link within normal text, then you must do this via code as shown above.

      T 1 Reply Last reply
      0
      • J Joshua Quick

        Try using a LinkLabel control. You can setup this control to show both normal text and a link. It can even display multiple links within its text. But you can't add the link from the designer. It must be done in code. myLink.Text = "This is my string, so click here" Const linkString As String = "here" myLink.Links.Add(myLink.Text.IndexOf(linkString), linkString.Length) -- modified at 20:54 Monday 16th January, 2006 Let me rephrase this a little. The text you enter into a LinkLabel in the form designer will become one big link, which is not what you want. If you want to embed a link within normal text, then you must do this via code as shown above.

        T Offline
        T Offline
        tibmark
        wrote on last edited by
        #3

        Thanks that works. One little question, I have seen a few balloon tooltips that are floating out there, how do they make it where all you have to do is write your string and wrap the word or words that you want to be a link with their tag (similar to html). Just wondering. Thank you, Mark Mark Thibodeaux

        J 1 Reply Last reply
        0
        • T tibmark

          Thanks that works. One little question, I have seen a few balloon tooltips that are floating out there, how do they make it where all you have to do is write your string and wrap the word or words that you want to be a link with their tag (similar to html). Just wondering. Thank you, Mark Mark Thibodeaux

          J Offline
          J Offline
          Joshua Quick
          wrote on last edited by
          #4

          The standard tooltip control can't display links in it. You may have to use a 3rd party control or make your own.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups