I want to limit mouse's position within main windows my application, how I can do this?
Do you mean you want to show mouse cursor only in the main window and hide it in all other windows ?