Hi LanceJames-3930,
Some key presses, such as the TAB, RETURN, ESC are typically ignored by some controls because they are not considered input key presses.
You can handle those key strokes via PreviewKeyDown event.
Please try the following code:
private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyData == Keys.Tab)
{
button1.Visible = false;
e.IsInputKey = true;
}
}
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.