How do I schedule a Windows task to run in the foreground?


  1. Posts : 5
    Windows 7
       #1

    How do I schedule a Windows task to run in the foreground?


    How do I force a scheduled task to run as a foreground window, to capture the focus when it runs?

    I wrote a little Delphi app to open a reminder window, but when I schedule it the silly window stays in the background, behind the other 50 windows I routinely have open, and I'm likely to miss it.

    I tried tweaking the app to force it to gain focus, but the only thing that does is make the icon flash in the icon bar.

    Is there a way to do this?
      My Computer


  2. Posts : 795
    windows 7 RTM x64
       #2

    In order to Force focus, you would have to include some stuff in the script. You need to take focus, then ignore user imput while it runs. Thats really the only way to force focus. Unless you can figure out how to make the window "always on top", but thats outside of my scripting knowledge.
      My Computer


  3. Posts : 5
    Windows 7
    Thread Starter
       #3

    Great point!

    Thanks for the "always on top" tip. That sort of works. It doesn't cause the window to gain focus, but at least displays it on top of all other windows.

    I have several other Delphi apps that use the "window always on top" feature. I'm surprised I didn't think of it.

    A partial solution is better than no solution.
      My Computer


  4. Posts : 795
    windows 7 RTM x64
       #4

    Glad I could be of some help.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:30.
Find Us