保持非活动窗口在外观上,即使激活外观、窗口

2023-09-02 20:49:34 作者:得过且过丶

有没有办法让一个窗口处于非活动状态看,即使它包含重点是什么?我有两种形式(A和B)。之后用户提供了一个互动,我转移焦点回到B.重点转移的结果(在A用户点击,然后重点转移回到B)是A型闪烁,从活动到非活动。这看起来丑陋(尤其是在Vista上,其中A暂时得到了更大的阴影)。我怎样才能让入住处于非活动状态显得很闪烁的会不会发生?

Is there a way to keep a window inactive looking, even if it contains focus? I have two forms (A and B). After the user interacts with A, I transfer focus back to B. The result of the focus transfers (the user clicking on the A, then focus being transferred back to B) is that form A blinks from active to inactive. This looks ugly (especially on Vista where A momentarily gets a bigger shadow). How can I make A stay inactive looking so this blinking will not happen?

推荐答案

最后,我找到了答案!

警告:不要滥用这个答案的方法的这样做会混淆用户,将是有害于一般的计算体验。下面描述的技术可以在某些情况下是非常有用(如实施类似IntelliSense的行为),但请的是明智在它的使用情况。

WARNING: DO NOT abuse this answer's technique. Doing so will confuse your users and will be harmful to the computing experience in general. The technique described below can be very useful under certain circumstances (e.g implementing IntelliSense-like behavior), but please be judicious in your usage of it.

href="http://msdn.microsoft.com/en-us/library/ms632633%28VS.85%29.aspx"> WM_NCACTIVATE 的消息被发送到一个窗口的