更改花费MouseHover事件时火 [英] Changing the time it takes for the mousehover event to fire

查看:185
本文介绍了更改花费MouseHover事件时火的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个WinForms C#项目使用.NET 4。

I'm making a winforms C# project with .NET 4.

我要显示工具提示当鼠标悬停在按钮或文本框或什么的。现在它显示几乎就在鼠标停止移动。我不喜欢这样。我希望它有更多的延迟​​了。

I want to display a tooltip when the mouse hovers over a button or a textbox or whatever. Right now it displays almost as soon as the mouse stops moving. I don't like this. I want it to have more of a delay.

有什么办法,我可以设置一个MouseHover事件的延迟时间是相同的所有已安装的用户?

Is there any way I can set a mousehover event delay time that is the same for all installed users?

我想我可以启动一个定时器,然后取消计时器,当鼠标再次移动,但也得是天哪一个更好的办法!

I suppose I could start a timer, and then cancel the timer when the mouse moves again but there's got to be a better way by golly!

推荐答案

试试这个,我认为这将真正帮助你。

Try this I think it will really help You

 ToolTip t = new ToolTip();
 t.InitialDelay = 500;
 t.SetToolTip(button1, "Hello");

这篇关于更改花费MouseHover事件时火的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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