Doggie Posted March 30, 2003 Share Posted March 30, 2003 Ever seen how programs designed for XP can have the xp theme that u have currently running? Well due to the fact VB6 wasn't designed for making XP programs (due to the fact it was for 95/98 at the time).So heres how it can be done two waysFirst Way: Exe.ManifestThis is the easier way of making themes to work on your program.For this example.. put a command button or two on the new project exe you startedplace the follow declarations in:Option ExplicitPrivate Declare Function InitCommonControls Lib "comctl32.dll" () As LongThis is declaring function for xp themesNow to ensure this works, we need to make the program enable this by putting in code in the Form_Initialize eventPrivate Sub Form_Initialize() InitCommonControlsEnd SubAnd for the command button click event put:Private Sub Command1_Click() Unload MeEnd SubOk now you can't see anything new if u run it in the IDE(intergrated development enviroment) so compile an exe to the desktop. Now if u run it it won't work.. why u say. because we haven't made the manifest file.Simply open up notepad and input the following lines:<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity type="win32" processorArchitecture="*" version="6.0.0.0" name="mash"/><description>Enter your Description Here</description><dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" language="*" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" /> </dependentAssembly></dependency></assembly>Save this file in the same directory as the exe and call it yourprogramname.exe.manifestNow run and u'll find it will have taken the XP themeQuestions, comments etc are welcome Link to comment Share on other sites More sharing options...
xpguy Posted April 4, 2003 Share Posted April 4, 2003 is that the same to what ms did with the office 2003 and wont that mean only windows xp can use the program? Link to comment Share on other sites More sharing options...
MSNwar Posted April 4, 2003 Share Posted April 4, 2003 Nice one Doggie. Link to comment Share on other sites More sharing options...
Doggie Posted April 7, 2003 Author Share Posted April 7, 2003 is that the same to what ms did with the office 2003 and wont that mean only windows xp can use the program? i don't understand the first question.. but the xp theme added to program doesn't mean it can't be used on other windows os's.. all it does is if the os happens to be XP, it will allow to take the current theme on the program.. so it automatically skins it as such.. Link to comment Share on other sites More sharing options...
Liam Posted April 9, 2003 Share Posted April 9, 2003 I just use the .exe.manifest without putting in the API Declare and it works Link to comment Share on other sites More sharing options...
Doggie Posted April 9, 2003 Author Share Posted April 9, 2003 lol yes u told me before Link to comment Share on other sites More sharing options...
brian Posted January 7, 2004 Share Posted January 7, 2004 Listview headers and other components do not get theme look, just command button. Any way to make all the components work or maybe just a few more? Link to comment Share on other sites More sharing options...
magicfly Posted January 7, 2004 Share Posted January 7, 2004 great doggie!!very very nice, it works! bye Link to comment Share on other sites More sharing options...
Doggie Posted January 7, 2004 Author Share Posted January 7, 2004 Listview headers and other components do not get theme look, just command button. Any way to make all the components work or maybe just a few more?depends what version of Microsoft Control u use.. version 5 is usually the one that has all of the controls themed.. Link to comment Share on other sites More sharing options...
fwm Posted January 9, 2004 Share Posted January 9, 2004 I can recommend that you embed the manifest file as a resource to your project, so it gets build inside the exe. Then you wont have to have a manifest file in your app folder.My experince is that it also gives less problems. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now