Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ウィンドウの境界線に対してもMouseEnter-Eventを作成することは可能ですか?最小化ボタンと最大化ボタンも意味します。Form1にイベントを設定した場合、フォーム内にいるときにのみ機能し、境界線やボタンには機能しないためです。
フォーム内のWndProcをオーバーライドして、mousemoveを検出できます
protected override void WndProc(ref Message m) { base.WndProc(ref m); // mouse in window or in Border and max, close & min buttons if (m.Msg == 0xa0 || m.Msg == 0x200) { //Do some thing } }