How do I detect if the left mouse button is being held down in the OnMouseMove
event for a control?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Your eventhandler for the OnMouseMove event should recieve a
MouseEventArgs
that should tell you if the left button is pressedSimply have a boolean set to true when the left mouse button is held and set it to false when its released.
If you check the condition of the bool when you fire the OnMouseMove event then you will be able to find out if its held down or not.
Psuedo code: