Disable window from calling SetForeGroundWindow

Eliza 21 Reputation points
2022-06-13T00:21:58.623+00:00

I have a serious problem on my work machine with a third party software window stealing keyboard focus, using a winapi monitor tool i detect that whenever the windows steal focus it first call SetForeGroundWindow.

While searching about, i have found the winapi LockSetForegroundWindow, wow i thought i had solved the problem, however, LockSetForegroundWindow blocks me from activating any other window.

I also found that would be possible to 'block' the window from calling SetForeGroundWindow using a hook, but i have no knowledge about hooking, would like to ask if there's something else i could try.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,445 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.