![]() |
1
6
http://github.com/rdp/redcar/commit/d7dfeb8e77f13e5596b11df3027da236f23c83f0 显示了我是如何在windows中完成的(使用ffi)。 一些有用的技巧“可能”是 在BringToFront.SetForegroundWindow(需要)之后添加“sleep 0.1” 打电话(希望这一个不是必须的)。 添加一个shell.set\u活动 之后 注意,setActive执行user32.dll BringWindowToTop调用,需要在分离线程输入之前完成。
http://betterlogic.com/roger/?p=2950 正确的 ) 在Linux上,forceActive 还涉及: How to bring a window to the front? http://github.com/jarmo/win32screenshot/blob/master/lib/win32/screenshot/bitmap_maker.rb#L110 “设置前景”似乎与 xp和windows 7 [1] Need to bring application to foreground on Windows 和 https://bugs.eclipse.org/bugs/show_bug.cgi?id=303710 |
|
2
6
|
![]() |
3
4
这实际上是Windows的一项功能,可以通过Tweak UI power toy启用(至少对于Windows XP)。启用时,O/S故意阻止窗口强制自己成为聚焦窗口,以阻止其“窃取焦点”。因此,抓取焦点的操作被更改为仅闪烁任务栏图标-因为O/S是根据用户的请求故意转换操作的,所以您对此无能为力(这是一件好事)。 这(可能)是因为 所以 许多应用程序滥用了“带到前台”API,这种行为既让用户恼火,又导致他们输入错误的应用程序。 |
![]() |
4
3
Bug 192036 - Shell.forceActive doesn't raise a window above all other windows @rogerdpack's query on Eclipse bug tracker dirty workaround 做我们需要的。
|
![]() |
5
2
|
![]() |
6
1
|