Development Questions From a New Delphi User

I am using Delphi 3.0 using an Oracle 7.3 connection to a large database.
Anyway, I have a few (hopefully) simple questions for anyone inclined to
help:

1).  How do I create a Time Out event where some event is triggered when the
user hasn't used a mouse or keyboard input for a period of time.
   I do have several forms and would think using events like OnKeyboardPress
and OnMouseDown for every object would be the wrong approach.

2).  I am using a TDataBase object linked to 3 TTables so that I can enter
the user name and password in the background for those password protected
tables.
   I cannot seem to end the program cleanly after I've accessed those
tables, so I figure I'm not getting a clean disconnect of the DataBase. I
set the DataBase with the Close method before terminating the application,
so I don't know what the problem is.

Any advice for either of these problems would be appreciated. If it helps, I
have the Orpheous add-on installed at this workstation too.

TIA,
  Jon Gabiou