/// <summary> /// WndProcオーバーライド /// </summary> /// <param name="m"></param> protected override void WndProc(ref Message m) { if (m.Msg == WM_MOUSEMOVE) {//マウスが動いてる間は常にCTRL押しっぱなしにする CommonProc.keybd_event(Keys.ControlKey, 0, 0, 0); m.WParam = (IntPtr)MK_CONTROL; } if (m.Msg == WM_MOUSELEAVE) { CommonProc.keybd_event(Keys.ControlKey, 0, 2, 0); } base.WndProc(ref m); }