2
在Visual Studio 2010中,我希望它嵌入清单使用默认设置:Visual Studio 2010中:如何嵌入清单使用默认设置
不幸的是,嵌入清单不包括6版本的依赖公共控件库:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
这意味着,我的WinForms应用程序 “不使用XP的主题”:
如何说服Visual Studio 2010包含一个清单,该清单包含对通用控件库版本6的依赖性?
对于C#应用程序,您需要Project-> Add New Item-> Application Manifest File。也就是说,我从来没有在WinForms应用程序中这样做过,只是为了让它使用comctl32 v6。确保您的控件“FlatStyle”属性设置为“System”。 – 2012-01-12 15:52:49
Winforms使用CreateActCtx(),因此它不需要清单条目。无法使Application.EnableVisualStyles()以其他方式工作。我想这个电话已经丢失,很难猜测。 – 2012-01-12 18:46:10
@HansPassant我不知道有可能LoadLibrary'comctl32.dll',并得到版本6+,没有清单。我认为融合加载器的目的是始终给予commctl32.dll的调用者版本5,除非他们特别要求6.您能否详细说明如何使用激活上下文来加载更高版本的comctl32? – 2012-01-12 22:01:20