Tooltip message assignment

P

Peter

I'm trying to dynamically assign tooltips like this...

dim MyVariableDoesntWork as string = "This stinks"


'dn1 is a label control

Private Sub dn1_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dn1.Enter, dn2.enter....

dim lbl as label
lbl = ctype(sender, label)
tooltip1.settooltip(lbl, MyVariableDoesntWork)

Can this work?
What am I doing wrong...?

-Peter
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Peter) scripsit:
dim MyVariableDoesntWork as string = "This stinks"


'dn1 is a label control

Private Sub dn1_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dn1.Enter, dn2.enter....

dim lbl as label
lbl = ctype(sender, label)
tooltip1.settooltip(lbl, MyVariableDoesntWork)

Can this work?
What am I doing wrong...?

That should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top