Hi ovah there !! ... Maybe u can help me out with this one:

I'm doing a HotKey program that actually activates the different Windows. When I say "activates" I mean to set the focus to a Window that doesn't belong to my process.
The problem that I'm having is that SetForegroundWindow actually doesn't work always (dunno why) but it simple does nothing !
Yes, I'm sure I'm passing the handle correctly, and the return code from the API is actually OK ...
Does any1 had the same problem in the past ? Do u have any clues ?


Thanx a lot for your help...


-MagicMac.
Posted on 2001-09-27 20:59:43 by magicmac
It's a feature in windows... it doesn't want applications to steal the
focus :). However, some apps seem to do this anyway, ICQ comes
to mind. Perhaps it has to do with window creation? Also, I think
Tweak UI has a checkbox where you can specify whether applications
are allowed to "steal focus". Yep, tweak ui->general... "prevent
applications from stealing focus".

Would be nice to come up with a way to always steal focus, it can
come in handy :).
:stupid:
Posted on 2001-09-27 22:36:45 by f0dder
Yeah, I found that the problem was with a particular application, not with the function itself ... Thanx a lot.


-MagicMac.
Posted on 2001-09-27 23:09:12 by magicmac