I have three controls on my form - a texbox, button and a picturebox. After clicking a button, both textbox and button itself become inactive. Also I have and Form1_KeyDown(object sender, KeyEventArgs e)
to send pressed buttons that will be displayed on picturebox, but for some reason everytime I press any key it beeps. I've noticed that it happens only with button and TextBox
deactivated. Why is that happening and how do I press keys without that annoying beeps?
e.SuppressKeyPress = true
is preventing the input of keys to control, I don't need that, I just need to rid of that sound (why is it there anyway, when I'm disabling two controls?)
UPD: I think the problem is that PictureBox
doesn't have a focus and also a KeyDown
event.