Click here to Skip to main content
16,006,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thanx to Davey and Hugo Monkey! Pin
0x3c01-Apr-09 0:41
0x3c01-Apr-09 0:41 
GeneralHello again.... need help! Pin
Rajdeep.NET is BACK1-Apr-09 1:19
Rajdeep.NET is BACK1-Apr-09 1:19 
GeneralRe: Hello again.... need help! [modified] Pin
DaveyM691-Apr-09 1:29
professionalDaveyM691-Apr-09 1:29 
GeneralRe: Hello again.... need help! Pin
Rajdeep.NET is BACK1-Apr-09 2:06
Rajdeep.NET is BACK1-Apr-09 2:06 
GeneralRe: Hello again.... need help! Pin
DaveyM691-Apr-09 2:24
professionalDaveyM691-Apr-09 2:24 
GeneralRe: Hello again.... need help! Pin
Rajdeep.NET is BACK1-Apr-09 2:50
Rajdeep.NET is BACK1-Apr-09 2:50 
GeneralRe: Hello again.... need help! Pin
DaveyM691-Apr-09 3:46
professionalDaveyM691-Apr-09 3:46 
GeneralRe: Thanx to Davey and Hugo Monkey! Pin
DaveyM691-Apr-09 0:44
professionalDaveyM691-Apr-09 0:44 
No problem Big Grin | :-D

I normally use my own version of the link label which I've just added a URL property to and overridden the OnClick so it starts the process automatically with no coding needed.
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms;
namespace WinForms.Controls
{
    /// <summary>
    /// LinkLabel with URL.
    /// </summary>
    public class URLLabel : LinkLabel
    {
        /// <summary>
        /// Creates a new instance of the URLLabel.
        /// </summary>
        public URLLabel()
        {
            URL = "about:blank";
        }
        /// <summary>
        /// Gets or sets the URL that will launched in the default browser when the label is clicked.
        /// </summary>
        [DefaultValue("about:blank"),
        Description("The URL that will launched in the default browser when the label is clicked.")]
        public string URL
        {
            get;
            set;
        }
        protected override void OnClick(EventArgs e)
        {
            try
            {
                Process.Start(URL);
            }
            catch (Exception ex)
            {
                // Log error here, or alert user.
                Console.WriteLine(ex.Message);
            }
            finally
            {
                base.OnClick(e);
            }
        }
    }
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

AnswerRe: Problem with LinkLabel Pin
Paul Unsworth1-Apr-09 0:25
Paul Unsworth1-Apr-09 0:25 
QuestionEncryption Problem Pin
Paul Unsworth1-Apr-09 0:15
Paul Unsworth1-Apr-09 0:15 
AnswerRe: Encryption Problem Pin
Rajdeep.NET is BACK1-Apr-09 0:36
Rajdeep.NET is BACK1-Apr-09 0:36 
AnswerRe: Encryption Problem Pin
SeMartens1-Apr-09 0:43
SeMartens1-Apr-09 0:43 
GeneralRe: Encryption Problem Pin
Paul Unsworth1-Apr-09 2:08
Paul Unsworth1-Apr-09 2:08 
AnswerRe: Encryption Problem Pin
MumbleB1-Apr-09 2:53
MumbleB1-Apr-09 2:53 
AnswerRe: Encryption Problem Pin
Rajdeep.NET is BACK1-Apr-09 2:53
Rajdeep.NET is BACK1-Apr-09 2:53 
GeneralRe: Encryption Problem Pin
Paul Unsworth1-Apr-09 3:22
Paul Unsworth1-Apr-09 3:22 
Questionhandled files Pin
lost_in_code1-Apr-09 0:13
lost_in_code1-Apr-09 0:13 
AnswerRe: handled files Pin
stancrm1-Apr-09 0:34
stancrm1-Apr-09 0:34 
GeneralRe: handled files Pin
lost_in_code1-Apr-09 0:39
lost_in_code1-Apr-09 0:39 
AnswerRe: handled files Pin
0x3c01-Apr-09 0:44
0x3c01-Apr-09 0:44 
GeneralRe: handled files Pin
lost_in_code1-Apr-09 0:58
lost_in_code1-Apr-09 0:58 
QuestionDataGridView.RowFilter question Pin
kanchoette31-Mar-09 23:51
kanchoette31-Mar-09 23:51 
AnswerRe: DataGridView.RowFilter question Pin
Eddy Vluggen31-Mar-09 23:59
professionalEddy Vluggen31-Mar-09 23:59 
AnswerRe: DataGridView.RowFilter question Pin
vinodkrebc1-Apr-09 1:24
vinodkrebc1-Apr-09 1:24 
QuestionExecuting PL/Sql Anonymous block from ADO Pin
Muammar©31-Mar-09 23:27
Muammar©31-Mar-09 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.