Let's Start (without introduction)![]()
Design your form and put your necessary controls in it (e.g. Form1)
Change "Startup Object" to Sub Main
Add a module and insert in it this code
VB Code:
Private Type tagInitCommonControlsEx lngSize As Long lngICC As Long End Type Private Declare Function InitCommonControlsEx Lib "comctl32.dll" _ (iccex As tagInitCommonControlsEx) As Boolean Private Const ICC_USEREX_CLASSES = &H200 Public Function InitCommonControlsVB() As Boolean On Error Resume Next Dim iccex As tagInitCommonControlsEx ' Ensure CC available: With iccex .lngSize = LenB(iccex) .lngICC = ICC_USEREX_CLASSES End With InitCommonControlsEx iccex InitCommonControlsVB = (Err.Number = 0) End Function Public Sub Main() InitCommonControlsVB ' Start your Application here ( e.g. Form1.Show ) Form1.Show End Sub
Now Build EXE Program ( for example test.exe )
Open Notepad and type
Save it in the directory you saved test.exe in it with name (test.exe.manifest)HTML Code:<?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.YourAppName" 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>
Finally, execute your program (test.exe) you will see all comon controls with XP Styles...![]()




Reply With Quote