Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Dim control As Control = FindName(MyObject.Name.ToString)
  2. AddHandler control.MouseEnter, Sub()
  3. Try
  4. Dim Tooltip As New ToolTip()
  5. Tooltip.SetToolTip(control, control.Name.ToString)
  6. Catch
  7.  
  8. End Try
  9.  
  10. End Sub
  11.  
  12. If TypeName(MyObject).ToString = "Button" then
  13. ...
  14. else if TypeName(MyObject).ToString = "Label" then
  15. ...
  16. else if TypeName(MyObject).ToString = "RadioButton" then
  17. ...
  18. End If
  19.  
  20. Dim Control as TypeName(MyObject).ToString = FindName(MyObject.Name.ToString)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement