Windows - ficar estilo Windows XP
|Top Previous Next|
Para Delphi 7: BASTA COLOCAR O COMPONENTE TXPManifest no form principal
Windows XP visual styles does not integrate into our application automatically.
I was looking for a way to make my form look much more attractive under WinXP, so i was looking around for an article to help me do that.
when i havent found any i decided to write this small article to explain how in a minor of 1 second you can make your basic-looking-controls-form change its look and plugin into WinXP skins.
as you should see its all depends on 1 small text resource.
first create a new text file and call it "XpXML.txt" (place it in your project folder) inside it paste the following lines:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
i think its self explaining, and there are few fields you can change like: name, version, description.. they doesnt affect the actual layout.
publicKeyToken is very important and should not be changed in any manner (just go to msdn.microsoft.com and look for "6595b64144ccf1df" to read some articles about it).
ok, second thing is to add another text file to your project called "XpRes.RC" and paste the following lines inside it:
1 24 XpXML.txt
now, the deal is not to forget to add this resource to your project by choosing "Add to Project" and choose the resource file "XpRes.RC".
some might ask what is "24", well its a common sign declared by microsoft to notify Windows.Shell that this application should have Windows XP visual styles (Skins) wrapped around it.
the only thing to do now is to "Build" the project and execute it.
place a listview with columns and some buttons to see the real change if your just testing this article on a blank form.
thats it, just execute and see how well it goes.