winform自定义工具提示 [英] winform custom ToolTip

查看:112
本文介绍了winform自定义工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#和Iam的新手,正在开发winform应用程序。我想开发一个自定义工具提示,如下面的链接所示。请建议我从哪里开始。任何例子对我来说都会更好。



预付结转





http://stackoverflow.com/questions/20851262/custom-tooltip-message / 20851297?noredirect = 1#20851297 [ ^ ]

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[^]

推荐答案

请参阅我对解决方案1的评论。最有可能的是,使用 OwnerDraw 相关的功能是不够的,即使这个属性在你选择作为你的基础的控件中可用。您需要使用自定义控件进行更严格的功能和渲染自定义。请参阅我过去的答案以获取更多详细信息:

在面板上捕捉绘图 [ ^ ],

什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...)) [ ^ ],

如何加速我的vb.net应用程序? [ ^ ],

mdi子表单之间的绘制线 [ ^ ]。



-SA
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


请注意,创建OwnerDrawn控件会将您带入更复杂的.NET领域,许多自定义工具提示也会使您成为需要特殊语法才能访问/使用的低级Windows API。根据你对C#和.NET的掌握程度,学习曲线可能很陡。



CodeProject上有很多文章可以解释,并提供有用的例子制作自定义工具提示,包括:[ ^ ]和[ ^ ]。花点时间看看提供的内容:[ ^ ]。



链接到的StackOverFlow线程基于显示的源代码这里:[ ^ ]。
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: [^].

这篇关于winform自定义工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆