我有一个问题,可能是一个简单的解决方案,但我只是不明白。 所以我想要发生什么事情,如果我按下鼠标左键。检测多个鼠标点击
private void DrawingPanel_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
//something happens
}
}
所以,工作正常。但现在问题来了客栈。现在,我要检查的单击事件中更多的点击(现在我想想,是甚至有可能?) 事情是这样的:
private void DrawingPanel_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
//something happens
//blabla...
if (e.Button == MouseButtons.Left)
{
//Do something
}
}
}
是类似的东西可能吗?因为第二个if (e.Button == MouseButtons.Left)
总是如此。 我该怎么做才能让它不是自动的?
这是哪一项技术? WinForms或WPF? – Spontifixus
抱歉忘了提。这是winforms –
当你停止点击时,应用程序如何知道?暂停长度,鼠标移出面板,键盘事件?或者你在说双击? – mcalex