MaxMouse Level: Protégé
 Registered: 04-01-2006 Posts: 6
|
Re: XP SKIN
Since VB uses the old version of msctl and the xp styles are version 6, you need to make a slight change to your code.
Private Declare Sub InitCommonControls Lib "comctl32" ()
Private Sub Form_Initialize()
Call InitCommonControls
End Sub
|
Once that is in your code, you compile your executable and make a MANIFEST file in notepad, which is as follows.
<?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"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Consider your executable is called 123abc.exe you would put the manifest file you just created in the same directory as that and name if 123abc.exe.MANIFEST
Your executable will now display windows xp visual themes.
as a side note you can embed the manifest file directly into your executable with an application called resource hacker, basically (in resource hacker) you choose, Action>Add new resource>Select the text file>input values (from top down) 24,1,1033 the manifest will now sit inside the executable and show xp visual styles
Regards
Max
|