• 大小: 0.01M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: t  

资源简介

熱鍵註冊使用

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HotKeyExample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            HotKey hotkey = new HotKey(Keys.A Keys.Alt); //註冊Alt+A為熱鍵
            hotkey.OnHotkey += new HotKey.HotkeyEventHandler(hotkey_OnHotkey);

            HotKey hotkey2 = new HotKey(Keys.B Keys.Control); //註冊Ctrl+B為熱鍵
            hotkey2.OnHotkey += new HotKey.HotkeyEventHandler(hotkey2_OnHotkey);

            HotKey hotkey3 = new HotKey(Keys.C Keys.Shift); //註冊Shift+C為熱鍵
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-01-06 21:52  HotKeyExample\
     目录           0  2010-01-06 21:56  HotKeyExample\HotKeyExample\
     文件        3018  2010-01-06 21:51  HotKeyExample\HotKeyExample\Form1.cs
     文件        1493  2010-01-06 21:51  HotKeyExample\HotKeyExample\Form1.Designer.cs
     文件        5814  2010-01-06 21:51  HotKeyExample\HotKeyExample\Form1.resx
     文件        3233  2010-01-06 21:52  HotKeyExample\HotKeyExample\HotKeyExample.csproj
     文件         475  2010-01-06 21:49  HotKeyExample\HotKeyExample\Program.cs
     目录           0  2010-01-06 21:52  HotKeyExample\HotKeyExample\Properties\
     文件        1195  2010-01-06 21:49  HotKeyExample\HotKeyExample\Properties\AssemblyInfo.cs
     文件        2912  2010-01-06 21:49  HotKeyExample\HotKeyExample\Properties\Resources.Designer.cs
     文件        5612  2010-01-06 21:49  HotKeyExample\HotKeyExample\Properties\Resources.resx
     文件        1098  2010-01-06 21:49  HotKeyExample\HotKeyExample\Properties\Settings.Designer.cs
     文件         249  2010-01-06 21:49  HotKeyExample\HotKeyExample\Properties\Settings.settings
     文件        1078  2010-01-06 21:52  HotKeyExample\HotKeyExample.sln
     文件        9216  2010-01-06 21:52  HotKeyExample\HotKeyExample.suo

评论

共有 条评论