The problem occurs because the mci command creates a new window, with windowclass AVIWnd32, and sets it's parent to your form. The mousemove windowmessages go to this AVIWnd32 window, and not to your form.

If you really want to load a form when the user moves the mouse over the window, you can either use Joacim Andersson's approach, or you can subclass the AVIWnd32 window, and look for WM_MOUSEMOVE messages.