Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Shortcut Keys don't work peroperly

$
0
0

Shortcut Keys not working unless Contextmenustrip is visible

I cannot use shortcutkeys on a toolstripmenuitem if that item is in a contextmenustrip unless the context menu is shown.

How do I do shortcut keys manually

I tried to override with Form1_KeyPress event but because the shortcutkeys are a combination of two (Ctrl T) I can't do it, the program debugs properly but it doesn't work.

private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
if (e.KeyCode == ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T))))
            {
                AddTab();
            }
        }



Ivan




Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>