Light and easy to have XP-style interface
When Windows XP is released, many of us have convinced and excite her gorgeous interface. However, when .Net1.0 is released, there are many people in our, including myself, I don't support the XP style. The fact is that in Windows XP (limited to WindowsXP) .NET supports the XP style, just do a little job.
This article mainly refers to http://www.codeproject.com/csharp/dotnetvisualstyles.asp to follow the steps below, so that your program has XP-style interface, Go!
1. Create a Windows application, then open assemblyInfo.cs, modify the content, below is the sample code: use system.Runtime.compilerServices;
[Assembly: AssemblyTitle ( "abc")] [assembly: AssemblyDescription ( "abc")] [assembly: AssemblyConfiguration ( "")] [assembly: AssemblyCompany ( "")] [assembly: AssemblyProduct ( "")] [assembly: AssemblyCopyright ( "")] [assembly: AssemblyTrademark ( "")] [assembly: AssemblyCulture ( "")] [assembly: AssemblyVersion ( "1.0.0.0")] [assembly: AssemblyDelaySign (false)] [assembly: AssemblyKeyFile ( " ")] [Assembly: askEMBLYKEYNAME (" ")]
2. Add new items to the project. Add an XML file, name the file [Your Program] .Exe.manifest, [Your Program Name] refers to the executable program name generated in the ../bin/debug folder. The contents of the file are as follows: You only need to modify Version = "1.0.0.0", name = "ABC",
XML Version = "1.0" encoding = "UTF-8" Standalone = "YES"?>
3. Add [Your Program] .Exe.manifest file to the executable of the program
(1) Menu -> File -> Open, open ../ bin / debug / [Your Program] .exe, now you can see a resource browsing tree; (2) Right click on the root directory [your Program Name], click Add Resource ... "; (3) Click Custom ..." in the dialog box, click "Custom ..."; (4) Name the resource type RT_Manifest, determine; (5) Double click resource The item under the rt_manifest under the tree (in general 101), the copy file [your program name] .Exe.manifest's content, paste in the open file, the result of paste is a binary form (the result is a bit strange, do not pay ignore) (6) Save, then change 101 ID to 1, and save it. Note that do not re-compile the program.
Now, reopen your program, how, the interface should be good.