Tooltip - Showing tip without cursor

Use this board to post your code snippets - tips and tricks
3 posts Page 1 of 1
Contributors
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

You know how when you use a ToolTip you would need to hover your house over the control to show?
Well I'll show you how to show the tip on any control you want without needing to hover your mouse over it.

First, add a ToolTip into your project - You don't have to edit anything.
Now use this code to show the tip over any control you want
Code: Select all
ToolTip1.Show("Your Text", Your Control, Duration)
Okay so let me explain it if you don't understand.

Where it say Your Text replace that with what you want your tip to say, maybe something like "Hello"
Where it say Your Control just replace that with the control you want it to show on, for example if you want the tip to show over button1 you would replace Your Control With Button1
Where it say Duration you would just put in how long you want the tip to last. 1000 = 1 second
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

That could come in handy for notifications. cooll;
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

This is a great snippit code :)
Image
3 posts Page 1 of 1
Return to “Quick Snips”