本文介绍了如何增加鼠标悬停事件计时器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 如何增加鼠标悬停事件计时器? AddHandler NewBtn.MouseHover,AddressOf Shownotes Private Sub Shownotes(ByVal sender As System.Object,ByVal e As System.EventArgs) MsgBox(" ttt") 谢谢!!! 解决方案 如何使用MouseEnter / MouseLeave代替?如果你需要一个计时器, MouseEnter可以启动计时器,MouseLeave可以阻止它。设置 计时器的间隔属性将设置悬停。时间到任何东西 你想要的(只要它是1毫秒或更长)。 但是看看你的代码,我想知道是否使用工具提示甚至一个 helpprovider可能会更好。你到底想要什么?完成了什么? 谢谢, Seth Rowe 如何使用MouseEnter / MouseLeave代替?如果你需要一个计时器, MouseEnter可以启动计时器,MouseLeave可以阻止它。设置 计时器的间隔属性将设置悬停。时间到任何东西 你想要的(只要它是1毫秒或更长)。 但是看看你的代码,我想知道是否使用工具提示甚至一个 helpprovider可能会更好。你到底想要什么?完成了什么? 谢谢, Seth Rowe 谢谢Seth, 你是对的...工具提示对我来说要好得多。 我现在只是看着他们。如何在代码中指定 按钮上显示的文本?我找不到任何tooltop选项,即 newbutton.tooltiptext? 谢谢Seth, 你是对的...工具提示对我来说要好得多。 我现在只是看着他们。如何在代码中指定 按钮上显示的文本?我找不到任何tooltop选项,即 newbutton.tooltiptext? ToolTip组件就是所谓的提供程序组件。它实际上为所有适用的控件和 容器(如你的表单)提供了一个新属性。话虽如此,在添加一个TooTip组件(默认情况下称为ToolTip1)后,每个控件 可以有一个工具提示,然后会有一个名为ToolTip on的属性。 /> ToolTip1" - 这是您应该为工具提示设置文本的地方。 谢谢, Seth Rowe Hi,How can i increase the mousehover event timer?AddHandler NewBtn.MouseHover, AddressOf ShownotesPrivate Sub Shownotes(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)MsgBox("ttt")Thanks!!! 解决方案How about using MouseEnter / MouseLeave instead? If you need a timer,MouseEnter could start the timer and MouseLeave could stop it. Settingthe timer''s interval property will set the "hover" time to anythingyou want (as long as it''s 1 millisecond or more).However looking at your code, I wonder if using tooltips or even ahelpprovider might be better. What exactly are you trying toaccomplish?Thanks,Seth RoweHow about using MouseEnter / MouseLeave instead? If you need a timer,MouseEnter could start the timer and MouseLeave could stop it. Settingthe timer''s interval property will set the "hover" time to anythingyou want (as long as it''s 1 millisecond or more).However looking at your code, I wonder if using tooltips or even ahelpprovider might be better. What exactly are you trying toaccomplish?Thanks,Seth RoweThanks Seth,you are right...Tooltips are much better for me.Im just looking at them now. How do i specify which text to show on abutton in code? i cant find any tooltop options i.enewbutton.tooltiptext?Thanks Seth,you are right...Tooltips are much better for me.Im just looking at them now. How do i specify which text to show on abutton in code? i cant find any tooltop options i.enewbutton.tooltiptext?The ToolTip component is what''s called a provider component. Itactually provides a new property to all the applicable control and thecontainer (like your form) that you drop it on. With that said, afteradding a TooTip component (called ToolTip1 by default) each controlthat can have a tooltip will then have a property called "ToolTip onToolTip1" - this is where you should set the text for the tooltip.Thanks,Seth Rowe 这篇关于如何增加鼠标悬停事件计时器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!