How can I make my own application on top in the start menu?

前端 未结 2 853
野的像风
野的像风 2020-12-29 09:35

I write a small desktop application (main form) in the C# language (.net). And i want to have my application in top of the start menu (Windows 8), just like the \"camtasia s

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 10:03

    If you want a window on top of Metro, you need it to declare accessibility. Here are the key points:

    1. The application must demand uiAccess (app.manifest)

    2. The application must assert “topmost” window positioning (either in Win32/SetWindowPos or WinForms/WPF’s “Topmost” property, programmatically or otherwise)

    3. Without making changes to the group policy setting, it must be installed to some trusted location [C:\Windows, C:\Program Files, C:\Program Files (x86)].

    a. Note: If you want to be able to run it out of an arbitrary location, you must disable the security setting: “User Account Control: Only elevate UIAccess applications that are installed in secure locations”.

    b. Note2: This is the same as setting HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures to 0

    1. Said application cannot be ran in the debugger

    2. If it’s a .NET application

    a. The manifest must be embedded in a post-build step

    b. The application must have “delayed signing” (meaning it cannot be ran from the built-in debugger, although you can build and attach – this is what Microsoft does)

    1. The application must be signed with a trusted certificate.

    2. Said trusted certificate must be installed to the Trusted Root Certificate Authority (this is important! It must not just simply installed)

    For more info see: http://msdn.microsoft.com/en-us/library/ms726294

提交回复
热议问题