KeyPreview = true property and set its KeyDown event to my method, tried both in designer and by writing this.Keydown += Form_KeyDown; in code, as well as both simultaneously. However no key press triggers the method. I have double-clicked the Event in the form editor many times to check again whether the Event is linked to the correct method and it definitely is. The method in question:
Join the Discord to ask follow-up questions and connect with the community
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,470 Members
Join