Пример #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);
        }
Пример #2
0
        private void btnsmcad_Click(object sender, EventArgs e)
        {
            frmjietu fro = new frmjietu(this, this.pictureBox1.Image, false);

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