C#DataGrideView鼠标点击 [英] C# DataGrideView mouse over click

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

问题描述

我在datagrideview和picturebox上创建一个窗口应用程序,它连接到sql连接plz告诉我如何在mouseoverride上选择一个单元格,而不是单击单元格,我只需在mouseover上选择一个单元格在单元格PLZ帮助我plz

解决方案

请参阅我的评论。在鼠标单击时选择控件中的任何内容都是预期的行为,而鼠标顺序则不是。 不要这样做。但是,如果你真的想用不方便的UI动作吓跑你的用户,请使用以下两个事件:

http://msdn.microsoft.com/en-us/library/system.windows.forms。 control.mouseenter.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseleave.aspx [ ^ ]。



或者,为了使情况更糟,请处理这个问题。 http ://msdn.microsoft.com/en-us/libr ary / system.windows.forms.control.mousehover.aspx [ ^ ]。



但更好的是,不要做任何事情那个



祝你好运,免于麻烦。

-SA

i make a windowapplication which is on datagrideview and picturebox which is connect with sql connection plz tell me how to select a cell in datagrideview on mouseover means(without clicking on cell) in short i just select a cell in datagrideview on just mouseover on cell plz help me plz

解决方案

Please see my comment. Selecting anything in a control on mouse click is expected behavior, on mouse order is not. Don''t do it. However, if you really want to scare off your users with inconvenient freaking UI action, use these two events:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseenter.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseleave.aspx[^].

Or, to make it even worse, handle this one http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousehover.aspx[^].

But much better, don''t do anything like that.

Good luck, stay out of trouble.
—SA


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

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