简体   繁体   English

如何在Winform应用程序中添加Windows 7视觉样式?

[英]How to Add Windows 7 visual style in winform application?

I have to change the look and feel of my win form application of .net framework 3.5. 我必须更改.net framework 3.5的win窗体应用程序的外观。 So i want to add window 7 theme or visual style, Is any sample application available? 所以我想添加window 7主题或视觉样式,是否有任何示例应用程序可用? and also suggest what to do change look and feel of my application? 并建议如何更改应用程序的外观?

The Windows API Code Pack for Microsoft® .NET Framework contains source code for using Win7/Vista features from .Net. Microsoft®.NET FrameworkWindows API代码包包含用于使用.Net的Win7 / Vista功能的源代码。

http://code.msdn.microsoft.com/WindowsAPICodePack http://code.msdn.microsoft.com/WindowsAPICodePack

write your own MANIFEST file for that. 为此编写您自己的清单文件。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="9.0.0.0"
    processorArchitecture="x86"
    name="ApplicationName.exe"
    type="win32"
/>
<description>YourApplicationName</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>

Save it as .exe.manifest OR embed it within the .resx file. 将其另存为.exe.manifest或将其嵌入.resx文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM