English 中文(简体)
Windows s “ 安全删除硬件” 对话框如何获得“ 前景爱”?
原标题:How does Windows s "Safely Remove Hardware" dialog get the "foreground love"?
问题回答

我做了一些实验, 根据我所看到的, 只有当新窗口属于 Windows Explorer 时才会发生。 某些控制面板在探索者内部或作为探索者插件( 例如) 中执行。 我最容易通过启动菜单打开动作中心( 启动菜单配置为在菜单中显示控制面板项目) 来复制它 。

因此,我怀疑这种行为是Windows Explorer拥有桌面窗口的结果,而GUI认为桌面窗口是一个特例。

唯一有点奇怪的是,我 无法在您正在谈论的 USB 对话框中复制这个行为, 而这( 当我尝试过的时候) 是由另一个过程( Randll32. exe 实例) 生成的。 这可能取决于其它因素 。

我无法想象一个比我现在有时间更复杂的测试方法, 但仔细观察SetFororororow Window docs, < a href="http://msdn.microsoft.com/en-us/library/ms633539(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms633539(VS.85).aspx , 评论中列出的关于可设定前台的流程的条件之一是:

  • The process received the last input event.

除非我弄错了, 否则 Windows Explorer 接收所有输入事件, 以便检查 Hotkeys 、 其它类似的焦点移动按键, 以及鼠标点击当前窗口范围以外的区域等 。

探索者因其永久的“ 收到最后一个输入事件” 状态, 有资格成为可以设定前景, 从而导致信息框被显示为前景, 没有任何特殊功能或没有记录的行为 。





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...