Get Mouse State without access to MouseEventArgs?

后端 未结 2 1768
旧巷少年郎
旧巷少年郎 2021-01-17 10:21

I have a form with many, many controls. I need to detect if the mouse is down or if it\'s up. Most of the time, I don\'t have MouseEventArgs.

Is the

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 10:51

    ChecK Control.MouseButtons static property:

    if (Control.MouseButtons == MouseButtons.Left)
    {
    }
    

提交回复
热议问题