Visual Basic
   Visual Basic.Net
   Downloads
   Links
   Support This Site
   Contact

Google
Web VBCodesource.com






How to make ToolTip windows in Visual Basic.Net.



In Visual Basic 6.0 we had a property for tooltip balloons. All you needed to do was type in the text you wanted to display. In Visual Basic.Net, that feature was removed. That doesn't mean we still can't have tooltips. It may surprise you as to how easy it is to implement this feature along with the ease and user-friendlyness. You will also see that we have much more "say" in what goes on with our tooltips as well. For Example, you can now set the length of time the pointer must remain stationary within the tooptip region before the tooltip text will appear.
To get started, start a new project. In your ToolBox look for a ToolTip component. If you do not see one, then right click inside your toolbox and select "Customize Toolbox". Click the ".Net Frameworks Componets" tab, scroll down till you find "ToolTip" then check the box and press OK. You should now see a ToolTip component available. Double click the ToolTip to add it to your project. I re-named mine toolTip. If you look at the propertys available for the ToolTip you will see the very nice Automatic Delay, Initial Delay, ect.. that are now available. I will not go over any of these settings since they are self-explanatory. Go ahead and add a button to the form. I named mine btn. In the btn_MouseHover event put:
toolTip.SetToolTip(btn, "Hello, This is just a simple test....")
Start your project and place your mouse pointer within the button region and let it sit idle for a few seconds. You should then see the ToolTip balloon popup with the text you specified. Now you see just how simple it is to add support for ToolTips. Go play around with all of the very nice properies available to fully customize your ToolTips.