Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to C# and Iam working on a winform application. I want to develop a my custom ToolTip as in the link below. Please suggest me from where to start . Any examples would be better for me.

Thanks in Advance


http://stackoverflow.com/questions/20851262/custom-tooltip-message/20851297?noredirect=1#20851297[^]
Posted
Comments
Ron Beyer 30-Dec-13 22:55pm    
So the link you provided has all the code, what exactly are you asking for examples of?

Please see my comment to Solution 1. Most likely, using OwnerDraw-related feature won't be enough, even if this property is available in the control you would pick as the base of yours. You would nee more serious functional and rendering customization using custom control. Please see my past answer for some further detail:
capture the drawing on a panel[^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
How to speed up my vb.net application?[^],
Drawing Lines between mdi child forms[^].

—SA
 
Share this answer
 
Please be aware that creating OwnerDrawn Controls takes you into more complex areas of .NET, and many custom ToolTips also make use of low-level Windows API's that require special syntax to access/use. Depending on your level of mastery of C# and .NET, the learning curve may be steep.

There are many articles here on CodeProject that will explain, and give useful examples of, making a customized ToolTip, including: [^], and [^]. Take the time to look around what is on offer: [^].

The StackOverFlow thread you link to is based on source code shown here: [^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Dec-13 23:39pm    
Bill, the problem with this answer is the need for distinction between owner-draw controls and custom controls. These areas really intersect. OwnerDraw is a property of some control classes which is mapped in corresponding Windows API feature and is used with some owner-drawing methods. Strictly speaking, it does not require event the creation of separate control classes.

In contrast to that, really serious controls are developed by creation of classes derived from Control, ScrollableControl, ButtonBase and other FCL classes. If the control is highly custom, rendering is done by overriding OnPaint, without using OwnerDraw... Most likely, OP needs the second approach. I'll add my answer to explain it.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900