2
votes

I have to show a Tooltip for a control via Win32-API programmatically. (I don't want to use the standard .NET 3.5 [WinForms] implemented way [ToolTip Extender Provider] cause of problems using only one Tooltip-Provider for all controls).

I use a new implementation of the Tooltip Extender of .NET from Codeproject: Building a BallonToolTip provider in C#, but they haven't implemented a function to show the Tooltip programmatically on this control. What simply means to popup the Tooltip on the control.

Any help would be appreciated.

Edit: Ok, I'm using the ToolTip for the error description of the validation error. But the .NET implementation has a Bug. The new wrapper works for me but it has not the ability desribed above.

2
I think you should make clear why you want to display the tooltip programmatically. If you try to use it within control-validation and want to show it after validation failed you should write it this way. If you want to do something else tell us more about it. - zoidbeck
I've edited my question. Hope that makes things clearer. - 70sCommander

2 Answers

2
votes

The Windows Forms ToolTip component already is a wrapper for the native Win32 tool tip control. You can write your own wrapper but you'll end up with the exact same result.

If you are contemplating this because you want to show more than one tooltip at a time, you probably don't want a tooltip at all. Consider using Labels that you make visible and hide with a timer, something like that. Do try to avoid confusing users with a UI that they've never seen before.

0
votes

Have you looked at this open source version of a tooltip here? It is a jazzed up version of the standard tooltips and can be used on any control.

Edit: If you are talking about a cue banner for textboxes also, I thought I might as well add this in for your benefit also, check this out. Also here is an article on Codeproject that implements the tooltip using an extended provider here.