Hi Olaf,
Use the static Control.ModifierKeys and Control.MouseButtons to check the status outside an event.
> Is there a way in the .NET framework to determin if a key is pressed and if
> a mouse button is pressed withou need of events?
[quoted text clipped - 4 lines]
> I could of course use the events version but I don't like to make my code
> complicated by passing on the states als booleans.

Signature
Happy coding!
Morten Wennevik [C# MVP]
Olaf Baeyens - 16 Aug 2005 13:40 GMT
> Use the static Control.ModifierKeys and Control.MouseButtons to check the status outside an event.
Fantastisc! :-)
I believe it is used something like this?
if ((System.Windows.Forms.Control.MouseButtons &
System.Windows.Forms.MouseButtons.Left)!=0) {
OnRotate(this,RotationEnum.RotateLeft);
}
Morten Wennevik - 16 Aug 2005 17:33 GMT
Indeed
>> Use the static Control.ModifierKeys and Control.MouseButtons to check the
> status outside an event.
[quoted text clipped - 6 lines]
> OnRotate(this,RotationEnum.RotateLeft);
> }

Signature
Happy coding!
Morten Wennevik [C# MVP]