P
pixel
hi
i just discovered something strange
when i use in ProcessCmdKey
this construction
switch(keyData)
{
case Keys.Left:
{
...
}break;
case Keys.Right:
{
...
}break;
}
everuthing is fine
but in this construction
if((keyData & Keys.Left) == Keys.Left)
{
...
}
else if ((keyData & Keys.Right) == Keys.Right)
{
...
}
program goes into "left" no matter if i press left or right arrow
why?
keys up and down and other work fine
pixel
ps
debuger shows propper values in keyData
i just discovered something strange
when i use in ProcessCmdKey
this construction
switch(keyData)
{
case Keys.Left:
{
...
}break;
case Keys.Right:
{
...
}break;
}
everuthing is fine
but in this construction
if((keyData & Keys.Left) == Keys.Left)
{
...
}
else if ((keyData & Keys.Right) == Keys.Right)
{
...
}
program goes into "left" no matter if i press left or right arrow
why?
keys up and down and other work fine
pixel
ps
debuger shows propper values in keyData