Here is a piece of code which would lock your desktop. Any code before unlocking which changes the display on screen will not be seen by the user. Even if you run a form...
DECLARE INTEGER GetDesktopWindow IN WIN32API
DECLARE INTEGER LockWindowUpdate IN WIN32API ;
INTEGER lnHandle
lnDeskTopWin = GetDeskTopWindow()
= LockWindowUpdate(lnDeskTopWin)
<
>
= LockWindowUpdate(0)