SetWindowPos failing to bring windows to front in Windows 8 when Windows 8 apps are running

时光总嘲笑我的痴心妄想 提交于 2020-01-06 07:14:11

问题


I have a chat application written in VB.net. It uses SetWindowPos function to set the window to top when a new chat message is received. It works fine also.But in windows 8 it will not bring the window to front when windows 8 apps like reader or photo is running.These apps will be running with full screen mode in Windows 8. So my chat application windows is not appearing at the top when popup occurs. So how can i make it to appear even when these windows 8 apps are running in full screen mode.


回答1:


Applications with 'UIAccess' are allowed to display on top of the full screen apps. Look at the answer to Windows 8 Layered Windows Over Metro Apps. This question is about layered windows, but that makes no difference. Eric's problem was the same as yours, that his window was not displaying on top of the Metro interface.

In short, you need to:

  1. Declare uiAccess="true" in your application's manifest
  2. Your executable needs to be digitally signed with a trusted certificate.
  3. Your application needs to be installed in a trusted location, i.e. Program Files


来源:https://stackoverflow.com/questions/15850230/setwindowpos-failing-to-bring-windows-to-front-in-windows-8-when-windows-8-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!