/// <summary> /// 快捷键操作 /// </summary> protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { // 标记为起点 case Keys.Z: btnSignStart_Click(null, null); break; // 标记终点 case Keys.X: btnSignEnd_Click(null, null); break; // 退播-X2 case Keys.Q: picBtn_Click(picBX2, null); break; // 退播-X1 case Keys.A: case Keys.Left: picBtn_Click(picBX1, null); break; // 暂停 case Keys.S: case Keys.Space://空格 picBtn_Click(picPause, null); break; // 播放X1 case Keys.D: case Keys.Right: picBtn_Click(picX1, null); break; // 播放X2 case Keys.F: picBtn_Click(picX2, null); break; // 播放X4 case Keys.G: picBtn_Click(picX4, null); break; // 停止 case Keys.B: picBtn_Click(picStop, null); break; // 保存并退出 case Keys.Escape://ESC labelClose_Click(null, null); break; case Keys.Up: MessageBox.Show("up"); break; case Keys.Down: MessageBox.Show("down"); break; case Keys.Enter: MessageBox.Show("enter"); break; } return base.ProcessCmdKey(ref msg, keyData); }
来源URL: http://blog.csdn.net/mengdong_zy/article/details/50378581