How to make a link for my site in a desktop program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bassem
    Contributor
    • Dec 2008
    • 344

    How to make a link for my site in a desktop program

    Hi all,
    I want to make a link that open the browser and set the url to a specific page.

    I tried to use linklabel but it not get what i want.

    any sample code or a link it'll be appreciated.

    Thanks in advance,
    Bassem
  • vekipeki
    Recognized Expert New Member
    • Nov 2007
    • 229

    #2
    LinkLabel should work, what do you mean by "I don't get what I want"?

    Comment

    • Bassem
      Contributor
      • Dec 2008
      • 344

      #3
      I followed the offline MSDN samples but i didn't make at the end a hyperlink.

      Comment

      • vekipeki
        Recognized Expert New Member
        • Nov 2007
        • 229

        #4
        If you're using the designer to add the LinkLabel, add the handler for the LinkClicked event, or you can add the code manually:

        Code:
        this.linkLabel1.LinkClicked
            += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
        Then add the method which will handle the click:

        Code:
            private void linkLabel1_LinkClicked(object sender,
                LinkLabelLinkClickedEventArgs e)
            {
                // Specify that the link was visited.
                this.linkLabel1.LinkVisited = true;
        
                // Navigate to a URL.
                System.Diagnostics.Process.Start("http://www.microsoft.com");
            }

        Comment

        • Bassem
          Contributor
          • Dec 2008
          • 344

          #5
          Thanks sooooo much !!!!!

          Regards,
          Bassem

          Comment

          Working...