C# 工具提示插件

发布于 2024-10-03 13:04:46 字数 131 浏览 0 评论 0原文

你好,我想用 C# 开发一个 Visual Studio 插件,以便在光标落在特定文本上时显示工具提示文本。

例如,如果有一行名为 Hello,我希望它在以下情况下弹出工具提示“hello world”我将鼠标光标放在上面 请帮帮我

hi i want to develop an addin to Visual studio in c# to display a tool tip text when the cursor lands on a particular text..

ex- if there is a line called Hello i want it to popup a tool tip "hello world " when i land the mouse cursor on it
please help me out

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过潦 2024-10-10 13:04:46

Visual Studio 2010 插件编写文章/教程?

而不是仅仅问如何要完成整个任务,请就您在执行任务时遇到的问题提出一个具体问题。有很多关于如何制作 VS2010 插件(或任何其他版本)的教程。开始编码,看看问题最终来自哪里。

Visual Studio 2010 addin writing articles/tutorials?

Rather than just ask how to do an entire task, ask a specific question about a problem you're having doing it. There are lots of tutorials around on how to make a VS2010 addin (or any other version). Start coding one and see where the problems end up coming from.

桃扇骨 2024-10-10 13:04:46

如果您指的是文本光标,那么可以使用插件来实现。事实上,这很容易。只需处理 TextDocumentKeyPressEvents 即可。该文章中还有一个完整的加载项示例。

如果您的意思是用鼠标指针悬停文本,则加载项中不直接支持它。您需要使用一些全局鼠标事件处理程序并手动检索指针下的文本。或者,我相信 VS 包对此类任务有更好的支持。

If you mean the text cursor, then this is possible with an add-in. In fact, it's quite easy. Just handle TextDocumentKeyPressEvents. There's also a complete add-in example in that article.

If you mean hovering a text with the mouse pointer, there's no direct support for it in add-in. You would need to use some global mouse events handler and manually retrieve the text under the pointer. Or, I believe, VS packages have better support for such tasks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文