ToolStrip的有时不响应鼠标点击 [英] ToolStrip sometimes not responding to a mouse click

查看:263
本文介绍了ToolStrip的有时不响应鼠标点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ToolStrip的上我的主要形式。NET 2.0 WinForms应用程序。有时候,ToolStrip的图标不resppond到第一个鼠标点击,所以我必须两次单击图标。这只是一个标准的ToolStrip几个图标和工具提示文本,我没有做什么特别的事情。这是常见的?

I have a .NET 2.0 WinForms application with a ToolStrip on my main form. Sometimes, the ToolStrip icons don't resppond to the first mouse click, so I have to click the icon twice. It's just a standard ToolStrip with several icons and tooltip texts, I don't do anything special. Is this common?

推荐答案

如果应用程序窗口还没有得到关注的焦点,你必须点击两次ToolStrip的按钮。第一次单击将焦点设置窗口,第二次引发Click事件。这是(不幸)的默认行为,它的设计。微软Word显示相同的行为(即使.NET ToolStrip的是不一样的控制)。

If the application window hasn’t got the focus, you have to click the ToolStrip button twice. The first click sets the focus to the window, the second raises the click event. This is (unfortunately) the default behaviour and it’s by design. Microsoft Word shows the same behaviour (even though the .NET ToolStrip is not the same control).

这篇关于ToolStrip的有时不响应鼠标点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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