Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

LinkLabel Image

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?
0
YZlat
Asked:
YZlat
1 Solution
 
Bob LearnedCommented:
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
   MessageBox.Show("clicked")
End Sub

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

Bob
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now