How can I close my C# WinForms program while there are some controls like treeviews, buttons and other stuff are present in it and they have focous and that could be they have same keyboard shortcut?
forexample in my treeview if I press ALT + ESC key, the nodes will be removed. but I want to be able by pressing ESC key the ‘this.Close()’ method to be called no matter if any control has focus.
Thanks.
Maybe you could try this by overriding on the
Form