How can I make a TImage as a link?

Posted on 2006-06-03
Last Modified: 2010-04-05

I have a TImage control on my form and I want to make it a link... I want when the user click on it, it opens the link in the default browser.

How can this be done?

Question by:AngryC
    LVL 16

    Expert Comment

    Hi AngryC.

    Use the OnClick event of the Image.
    Write this line :

    ShellExecute(Handle, 'open', '', '', '', SW_SHOWMAXIMIZED);

    LVL 16

    Accepted Solution

    It will look like this :

    procedure TForm1.Image1Click(Sender: TObject);
    ShellExecute(Handle, 'open', '', '', '', SW_SHOWMAXIMIZED);

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now