I have a program that hooks mouse and keys by the APIs:
SetWindowsHookEx
CallNextHookEx
UnhookWindowsHookEx
All works without problems, with an only issue (only in Win7, not in XP):
In Win7, if I set the 'Classic' visual style all it's Ok.
If I set a 'Basic' or any 'Aero' style, if I close any window by a .net button (Me.Close code) all it's Ok, but if I close the window by the form "X" button, the mouse cursor stops to move for about 5-6 seconds and the window needs about 5-6 seconds to close.
Why??? What is the difference (with an Aero theme) between to close a window by a "Me.Close" code or by pressing the "X" button?? :confused:
EDIT: no problems also if I close the forms by "Alt-F4"... :confused:
It seems that pressing the "X" button is executed a very particular code..... how to intercept and overwrite this code?
SetWindowsHookEx
CallNextHookEx
UnhookWindowsHookEx
All works without problems, with an only issue (only in Win7, not in XP):
In Win7, if I set the 'Classic' visual style all it's Ok.
If I set a 'Basic' or any 'Aero' style, if I close any window by a .net button (Me.Close code) all it's Ok, but if I close the window by the form "X" button, the mouse cursor stops to move for about 5-6 seconds and the window needs about 5-6 seconds to close.
Why??? What is the difference (with an Aero theme) between to close a window by a "Me.Close" code or by pressing the "X" button?? :confused:
EDIT: no problems also if I close the forms by "Alt-F4"... :confused:
It seems that pressing the "X" button is executed a very particular code..... how to intercept and overwrite this code?