Search code examples
c#formseventspropertiespicturebox

Does a picturebox not support keyboard events?


I am currently using Visual Studio, and I don't know if this is a glitch or not, but when I go into the form properties, and show the events, there are two events called KeyDown and KeyUp. Now when I do the same for a PictureBox, it has way less events and no KeyDown and KeyUp events. Does the PictureBox support less events then other things? Is this a glitch?

Screenshot of Form1 properties:

enter image description here

Screenshot of PictureBox1 properties:

enter image description here


Solution

  • Its not a glitch. Its the way it is. You don't type in PictureBox. If you need to do some task through keys, route it through form only