コード例 #1
0
        public ScreenshotHandlerForm(Type type)
        {
            InitializeComponent();

            t = type;

            if (t == Type.FullScreen)
            {
                ghk = new GlobalHotkey(Constants.CTRL + Constants.SHIFT, Keys.D3, this);
            }
            else if (t == Type.Selection)
            {
                ghk = new GlobalHotkey(Constants.CTRL + Constants.SHIFT, Keys.D4, this);
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("Invalid type!");
            }

            if (!ghk.Register())
            {
                MessageBox.Show("Failed to register an hotkey!");
            }

            this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        }
コード例 #2
0
        public ScreenshotHandlerForm(Type type)
        {
            InitializeComponent();

            t = type;

            if (t == Type.FullScreen)
                ghk = new GlobalHotkey(Constants.CTRL + Constants.SHIFT, Keys.D3, this);
            else if (t == Type.Selection)
                ghk = new GlobalHotkey(Constants.CTRL + Constants.SHIFT, Keys.D4, this);
            else
                System.Diagnostics.Debug.WriteLine("Invalid type!");
            
            if (!ghk.Register())
                MessageBox.Show("Failed to register an hotkey!");

            this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        }