如何判断鼠标左右键一起按下的事件

RoninBlade 2005-06-24 03:59:34
有什么简单方法没有?
...全文
252 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
RoninBlade 2005-06-28
  • 打赏
  • 举报
回复
实际上,我希望判断是否同时抬起鼠标左右键
APP开发王 2005-06-28
  • 打赏
  • 举报
回复
就是啊晕
dengxw 2005-06-25
  • 打赏
  • 举报
回复
If (Control.MouseButtons And &H300000) = &H300000 Then
晕~这里面的&H300000是什么意思啊?
阿云ivan 2005-06-25
  • 打赏
  • 举报
回复
算是见识到高手了
淡蓝色2 2005-06-24
  • 打赏
  • 举报
回复
只须一条核心语句就能解决问题
在窗体或控件的OnMouseDown里做处理。
如下面代码所示

Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
If (Control.MouseButtons And &H300000) = &H300000 Then
'两个键都按下去了
Else
'只按下去一个
End If
End Sub

给分吧 呵呵
hatita 2005-06-24
  • 打赏
  • 举报
回复
bool lflag = true;
bool rflag = true;

protected override void OnMouseDown(MouseEventArgs e)
{
switch(e.Button)
{
case MouseButtons.Left:
lflag = false;
break;
case MouseButtons.Right:
rflag = false;
break;
}

if(!lflag && !rflag)
{
int i = 0;
}
}


protected override void OnMouseUp(MouseEventArgs e)
{
switch(e.Button)
{
case MouseButtons.Left:
lflag = true;
break;
case MouseButtons.Right:
rflag = true;
break;
}
base.OnMouseUp (e);
}
ccghghgj 2005-06-24
  • 打赏
  • 举报
回复
能够实现这个效果,的确很变态


================================================================
此帖通过csdn小助手回复。
CSDN小助手是使用vb.net编写的CSDN论坛脱机“外挂”,她能够在
脱离IE的情况下使用Csdn论坛。程序只加载最核心的数据,所以显示更
快,产生的流量更小。

下载地址:http://qqwwee.com/csdn.rar
================================================================
ccghghgj 2005-06-24
  • 打赏
  • 举报
回复
能够实现这个效果,的确很变态


================================================================
此帖通过csdn小助手回复。
CSDN小助手是使用vb.net编写的CSDN论坛脱机“外挂”,她能够在
脱离IE的情况下使用Csdn论坛。程序只加载最核心的数据,所以显示更
快,产生的流量更小。

下载地址:http://qqwwee.com/csdn.rar
================================================================
stonegoldaustin 2005-06-24
  • 打赏
  • 举报
回复
说实话,真的很BT
langjifengyu 2005-06-24
  • 打赏
  • 举报
回复
判断MOUSEDOWN
mousebuttons.right和mousebuttons.left

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧