Exemplo n.º 1
0
        /// <summary>
        /// 截图快捷键
        /// </summary>
        /// <param name="m"></param>
        protected override void WndProc(ref Message m)
        {
            const int WM_HOTKEY = 0x0312;

            //按快捷键
            switch (m.Msg)
            {
            case WM_HOTKEY:
                switch (m.WParam.ToInt32())
                {
                case 110:            //大图
                    frmjietu fro = new frmjietu(this, pictureBox1.Image, true);
                    fro.Show();
                    this.WindowState = FormWindowState.Minimized;
                    break;

                case 111:            //小图
                    frmjietusmall fro1 = new frmjietusmall(this);
                    fro1.Show();
                    this.WindowState = FormWindowState.Minimized;
                    break;
                }
                break;
            }
            base.WndProc(ref m);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 小截图
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click_1(object sender, EventArgs e)
        {
            frmjietusmall fro1 = new frmjietusmall(this);

            fro1.Show();
            this.WindowState = FormWindowState.Minimized;
        }