ToolTips

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
3 posts Page 1 of 1
Contributors
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

ToolTips
MrAksel
ToolTips are really nice when you want to display some info about a control/thingy without filling the form with labels. To use one, just add a ToolTip to your form.
You can set various properties that change the behavior of the ToolTip. The standard values are often the best. To look up each property visit this page.

You can attach a ToolTip to several controls. To set some text to show when your mouse is hovering over, for example Button1, add this little piece of code to your Form.Load event handler:
Code: Select all
ToolTip1.SetToolTip(Button1, "This is Button1. Nothing happens if you click it")
To remove every associated control you can simply use ToolTip1.RemoveAll()
If you want to display the ToolTip without having to move the mouse over a control, you can use this to show it:
Code: Select all
ToolTip1.Show("ToolTip was shown", Me)
The second parameter could be any control the ToolTip will be displayed over.
Simple as that :)
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Re: ToolTips
Skillful
Nice little tutorial MrAksel :)
Keep up the good work cooll;
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: ToolTips
Codex
Simple but good little tutorial. cooll;
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
3 posts Page 1 of 1
Return to “Tutorials”