如何检查鼠标光标在标签上?/ [英] how can i check my mouse cursor is on label?/

查看:63
本文介绍了如何检查鼠标光标在标签上?/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部受推荐,

我在该应用程序中制作了类似于Visual Studio IDE的Winform应用程序,我在窗体上采取了1个按钮并处理button_hover和button_leave事件,而在button_hover事件上,我在其右侧和面板中显示了面板,我已经采取了按钮和标签,但是当我在在标签上悬停然后禁用面板时,与文本框发生相同的事情.在文本框上悬停禁用.....在这里,我必须检查鼠标光标是否在标签上然后启用面板//我该怎么做. .i在面板内部有检查标签事件,但不起作用.....所以任何帮助...

Respected All,

i am making winform application like visual studio IDE in that app i have taken 1 button on form and handling button_hover and button_leave events and on button_hover event i am showing panel to their right and inside the panel i have taken button and label but when i am on hover of label then panel is disable same thing happend\s with textbox when on hovering textbox panel disables.....here i have to check if mouse cursor is on label then Enable panel// SO HOW CAN I DO THAT...i have check label events inside panel but doesnt work.....So any help...

推荐答案

在MouseHover事件的标签上写以下代码为

Write following code on MouseHover event of label as

private void label1_MouseHover(object sender, EventArgs e)
     {
         MessageBox.Show("Your mouse cursor is on level...");
     }


尝试使用以下javascript:

Try using the below javascript:

<script type="text/javascript" src="jquery.js">
<script type="text/javascript><br mode=" hold=" />


(document).ready(function() {<br mode="></script>
(document).ready(function() {<br mode="></script>


这篇关于如何检查鼠标光标在标签上?/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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