I'm not sure why you need the sleep, findwindow returns a number (the handle to a window) and if it can not find the window, it returns 0. So, do until ret > 0 should work just fine. You may also consider using "doevents" which makes the program process other things temporarily before moving on your code. To answer you actual question, however, there is another API call, called "getdesktopwindow" which will return the hwnd (the numbers that windows refers to the window as) of the desktop to a long variable..
Something that you might want to look at, is the blockinput API call. This will help you I think, but there is a problem, that I'm still looking into, and that is how to disable ctrl-alt-delete with it.... it seems to block everything except for ctrl-alt-del..... so try this:
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
DoEvents
retval = BlockInput(True)
Sleep 10000
retval = BlockInput(False)
End Sub
This code blocks all input (except for ctrl-alt-delete, working on that) for 10 seconds..... you can obviously block for as long as you want, be it in a loop or whatever.... but be careful