You need to set
KeyPreview=True
for your form. Otherwise key press is swallowed by the control that has focus.
More Related Contents:
- Trim String to int, then char to string, Listbox to textbox
- How to use (get and set) httpcontext.current.Session in the class library, within MVC web api application? [duplicate]
- Calculate relative time in C#
- How to register multiple implementations of the same interface in Asp.Net Core?
- Cancellation token in Task constructor: why?
- When should I use “using” blocks in C#? [duplicate]
- Escape command line arguments in c#
- Format a date in XML via XSLT
- How to check if IEnumerable is null or empty?
- How to detect when a windows form is being minimized?
- Is there any JSON Web Token (JWT) example in C#?
- Do I need a Global.asax.cs file at all if I’m using an OWIN Startup.cs class and move all configuration there?
- How to run multiple SQL commands in a single SQL connection?
- How to change listview selected row backcolor even when focus on another control?
- Why am I getting ‘One or more types required to compile a dynamic expression cannot be found.’?
- Dynamic button creation & placing them in a predefined order using c#
- How can I embed any file type into Microsoft Word using OpenXml 2.0
- Where is Request.IsAjaxRequest() in Asp.Net Core MVC?
- Close button for TabPages of Right To Left TabControl c#
- Find out the control with last focus
- List sort based on another list
- Generics: Why can’t the compiler infer the type arguments in this case?
- Populating a ComboBox using C#
- Asynchronous Controller is blocking requests in ASP.NET MVC through jQuery
- Load a ResourceDictionary from an assembly
- Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean
- ItemPropertyChanged not working on observableCollection.Why?
- Avoiding the woes of Invoke/BeginInvoke in cross-thread WinForm event handling?
- Reference to undeclared entity exception while working with XML
- c# WebRequest using WebBrowser cookie