|Why would you want something like notepad in high priority. It just sits there doing nothing until a key is pressed or a mouse is clicked. I am pretty certain that you cannot type fast enough to make a high priority task make any difference. What is it you are trying to achieve?|
You can invoke Sleep by using the sleep API
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sleep 1000 will put the application to sleep for one second
You realise of course that all sleep does is freeze the current application so nothing happens until the sleep period expires. No keyboard input, no mouse clicks, nothing. Most applications for the sleep function are usually only for a few milliseconds, usually to allow time for some external function to complete, like deleting a file, before the application proceeds with the next line of code.