Exemple #1
0
 public void UnregisterHotKeys()
 {
     //注销Id号为100的热键设定
     HotKeysManager.UnregisterHotKey(Handle, 100);
     //注销Id号为101的热键设定
     HotKeysManager.UnregisterHotKey(Handle, 101);
 }
Exemple #2
0
 private void labelTest_MouseEnter(object sender, EventArgs e)
 {
     //注册热键Ctrl+C,Id号为100。。
     HotKeysManager.RegisterHotKey(Handle, 100, HotKeysManager.KeyModifiers.Ctrl, Keys.C);
     //注册热键Ctrl+V,Id号为101。
     HotKeysManager.RegisterHotKey(Handle, 101, HotKeysManager.KeyModifiers.Ctrl, Keys.V);
 }
Exemple #3
0
 private void labelTest_MouseLeave(object sender, EventArgs e)
 {
     //注销Id号为100的热键设定
     HotKeysManager.UnregisterHotKey(Handle, 100);
     //注销Id号为101的热键设定
     HotKeysManager.UnregisterHotKey(Handle, 101);
 }
Exemple #4
0
        public MyLabel() : base()
        {
            //注册热键Ctrl+C,Id号为100。。
            HotKeysManager.RegisterHotKey(Handle, 100, HotKeysManager.KeyModifiers.Ctrl, Keys.C);
            //注册热键Ctrl+V,Id号为101。
            HotKeysManager.RegisterHotKey(Handle, 101, HotKeysManager.KeyModifiers.Ctrl, Keys.V);

            ////注销Id号为100的热键设定
            //HotKeysManager.UnregisterHotKey(Handle, 100);
            ////注销Id号为101的热键设定
            //HotKeysManager.UnregisterHotKey(Handle, 101);
        }