How to add ToolTips to any Component
Use this board to post your code snippets - tips and tricks
2 posts
Page 1 of 1
Hi All
I have been trying to work this out for ages and have just got it too work wahooo;
Here is a Bit of EASY Code so that you can add Tooltips to any Component you put on a Form
Drag a TOOLTIP COMPONENT on to your Form and add a TEXTBOX and add the code below IN YOUR FORM LOAD
Like this
Dim Tips As New Windows.Forms.ToolTip
Tips.SetToolTip(TextBox1, "Codenstuff is the Dogs Dangley's")
Tips.SetToolTip(Button1, "Click here to go to Codenstuff")
Tips.SetToolTip(Button2, "Click to Visit my Site")
Change the Textbox1 (for the name of your Component name ( ie Button1, Listbox, Label1, you can add this to Tabbed Components as well and so on ) and just change the text between the brackets to say what you like...
This can be used on Buttons as well and just about any other Component wahooo;
Enjoy
Chris
For some reason it has shown this Image over the Code???????
But anyway the Code above is what i used and works great
![Image]()
I have been trying to work this out for ages and have just got it too work wahooo;
Here is a Bit of EASY Code so that you can add Tooltips to any Component you put on a Form
Drag a TOOLTIP COMPONENT on to your Form and add a TEXTBOX and add the code below IN YOUR FORM LOAD
Code: Select all
Then for each Component you put on your Form Just repeat the code ( but leave out the First line starting with DIM)Dim Tips As New Windows.Forms.ToolTip
Tips.SetToolTip(TextBox1, "Codenstuff is the Dogs Dangley's")
Like this
Dim Tips As New Windows.Forms.ToolTip
Tips.SetToolTip(TextBox1, "Codenstuff is the Dogs Dangley's")
Tips.SetToolTip(Button1, "Click here to go to Codenstuff")
Tips.SetToolTip(Button2, "Click to Visit my Site")
Change the Textbox1 (for the name of your Component name ( ie Button1, Listbox, Label1, you can add this to Tabbed Components as well and so on ) and just change the text between the brackets to say what you like...
This can be used on Buttons as well and just about any other Component wahooo;
Enjoy
Chris
For some reason it has shown this Image over the Code???????

*Thanked*
Very nice snippet, I really didn't knew it was possible to add a tooltip to a textbox like that, simply call the tooltip function :O
Very nice snippet, I really didn't knew it was possible to add a tooltip to a textbox like that, simply call the tooltip function :O
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023