views:

29

answers:

1

hi !

i'm using a certain program that has a multitude of windows and each and every one of those windows might steal focus at certain times (mostly when they open). i would like to prevent a specific window from stealing focus when it opens (and also at other times, but that's less important and i can probably figure it out on my own if i'm given the solution for the main problem). i would like doing it in C# but any other programming language is probably good as well.

A: 

This is a recurring and old question.

Raymond Chen addressed it on his blog a while ago:

http://blogs.msdn.com/b/oldnewthing/archive/2005/06/07/426294.aspx

Essentially, it just ends up being an arms race.

John Weldon
i don't think you really read my question.i don't want any and all programs to never get focus, i want a specific window to not steal focus when it opens (which it shouldn't steal in the first place), for a specific amount of time (like 1 second, so all the load stuff is done and it'll only steal focus when it needs input).
xyious
also i think this is supposed to keep any window from stealing focus:http://msdn.microsoft.com/en-US/library/ms633532.aspx
xyious
Let me know how that works.
John Weldon