mouse movement on a minimised form


I'm trying to write a screensaver in Delphi Version I - the problem
is, I don't want to make it a .scr file.  This is because the program
I'm writing has several modes of which 'screensaver' is only one.

What I want to do is have a loader program, running minimised, which
will detect mouse movement and keyboard use, and then load the main
exe when the computer's been left alone.  That means I need a way of
detecting mouse movement and keyboard use while the form is minimised
or hidden.

Does anyone have any ideas for an easy way to do this?

Christian Darkin