C# Form KeyPress event

Spread the love

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{

if (keyData == Keys.F12)
{

btntest2.Visible = true;

return true;
}
if (keyData == Keys.F11)
{

btntest2.Visible = false;

return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}

Bir yanıt yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.