I would like to restrict the movement of the mouse pointer/cursor within a Delphi 3 application's window. Assuming I'm working at 1024x768, and my form is some odd size smaller than this. When the form appears, I want to be able to keep the mouse within the form. When I close the form, I want the mouse to have free roam again. How do I do this?