By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,530 Members | 880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,530 IT Pros & Developers. It's quick & easy.

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

P: 344
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,
Jan 2 '09 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 229
LinkLabel should work, what do you mean by "I don't get what I want"?
Jan 2 '09 #2

P: 344
I followed the offline MSDN samples but i didn't make at the end a hyperlink.
Jan 2 '09 #3

Expert 100+
P: 229
If you're using the designer to add the LinkLabel, add the handler for the LinkClicked event, or you can add the code manually:

Expand|Select|Wrap|Line Numbers
  1. this.linkLabel1.LinkClicked
  2.     += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
Then add the method which will handle the click:

Expand|Select|Wrap|Line Numbers
  1.     private void linkLabel1_LinkClicked(object sender,
  2.         LinkLabelLinkClickedEventArgs e)
  3.     {
  4.         // Specify that the link was visited.
  5.         this.linkLabel1.LinkVisited = true;
  7.         // Navigate to a URL.
  8.         System.Diagnostics.Process.Start("");
  9.     }
Jan 2 '09 #4

P: 344
Thanks sooooo much !!!!!

Jan 2 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.