Is it possible to conditionally use XPManifest at runtime?

此生再无相见时 提交于 2019-12-05 18:00:28

问题


I'm trying to let the user choose if he wants to use themed style or not. Is it possible to dynamically "load" the XPManifest?

If user accepts the themed style then use the manifest, otherwise use the classic theme. At program startup after dialog with style selection closes I would like to do something like:

if UserWantsThemedStyle then
  LoadManifestSomehow
else
  UseClassicStyle;

Is it even possible to do it at runtime?

Thanks


回答1:


Yes you can do this. You need to use the activation context API which allows you to activate different manifests at runtime. I have used it to enable themes in an Excel add-in.



来源:https://stackoverflow.com/questions/7526665/is-it-possible-to-conditionally-use-xpmanifest-at-runtime

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