LinkLabel Image

Posted on 2006-05-30
Last Modified: 2011-10-03
I have a LinkLabel control on my form, that contains Link Image and Link Text. I enabled LinkClicked event by adding the following code:
 LinkLabel1.LinkArea.Equals(LinkLabel1.Location.X, Len(LinkLabel1.Text))

The code above makes Text part of my LinkLabel clickable but not the image.
How do I ensure that both, Image of LinkLabel and Text of LinkLabel are clickable?
Question by:YZlat
    1 Comment
    LVL 96

    Accepted Solution

    This is how I would do it:

    1) Set the Cursor to Hand

    2) Define a click handler:

    Private Sub LinkLabel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkLabel1.Click
    End Sub

    3) This would mean that clicking anywhere on the LinkLabel would be handled.


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    This video discusses moving either the default database or any database to a new volume.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 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

    19 Experts available now in Live!

    Get 1:1 Help Now