954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

label click using code

hello friends,
how can i perform a label click event using the code only.
like in button we have a code like
me.button1.performclick
is there something like in label
thanks in advance....

aadi_capri
Light Poster
40 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

You have to subscribe to a Click event of label control:

Public Sub New()
	'constructor
	label1.Click += New EventHandle(AddressOf label1_Click)
End Sub

Private Sub label1_Click(sende As Object, e As EventArgs)
	MessageBox.Show("label clicked.")
End Sub
Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: