3

Is it possible to create a MouseEnter-Event also for the border of the window? I mean also for the minimize and maximize-buttons. Because if I set the Event for my Form1, it works only when i'm inside the Form, but not on the border and the Buttons.

asdasdad
  • 832
  • 3
  • 15
  • 27
  • Here http://stackoverflow.com/questions/3312752/capturing-mouse-keyboard-events-outside-of-form-app-running-in-background may be help you. – OammieR Apr 11 '12 at 09:08

1 Answers1

4

You can override WndProc in you form and you can detect 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
            }
        }
Amen Ayach
  • 4,288
  • 1
  • 23
  • 23