I'm creating av On screen keyboard. To send keys I do following (pseudocode):
SetMyWindowTopMost(true)
SetReceiverWindowActive()
Sleep(100)
SendInput(keys)
SetMyWindowActive()
SetMyWindowTopMost(false)
I give focus to another application for a short time (~100 ms) and then regains focus. But开发者_如何学Python I do not want it to appear
The problem is that my program flashes every time it becomes inactive and then active again. Can I prevent it in any way, so that it looks like it is constantly active.
You would be handling WM_NCACTIVATE
message for the period of the possible flash. Either prevent the message to reach DefWindowProc
, or modify wParam
to be 'true' as in this answer.
精彩评论