tags:

views:

361

answers:

2

Hello Community,

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.

Greetz from Germany, Marco

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.

A: 

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.

Hope this helps, Best regards, Tom.

tommieb75
Thanx, for the quick response. But what I'am searching for is a code snippet. But I will reconcider that, if there's no answer I can use either.
70sCommander
+1  A: 

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.

Hans Passant
Yes, I know that the Windows Forms method is a wrapper. But wrappers can be implemented in other ways. What not means that the wrapper uses other functions.But to your assumption I can say that I don't want to use Tooltips to confuse the user by showing more than 1 Tooltip.
70sCommander
I dunno, it sure sounds like you're trying to solve a problem the wrong way. ToolTip is already quite capable of showing one tip at a time. Maybe you ought to start a new thread and explain exactly what is going wrong. These kinds of problems tend to be solved with a single line of code.
Hans Passant
Sorry, but the question is not what is behind that decision to use another Tooltip-Provider. But thanx for your comments.
70sCommander