Adding Windows XP Styles 2 Ur Application
What is meant by Windows XP Styles ?
to understand what is meant by Windows XP Styles Look at the first attatched picture :
to do that you must have this code in your project :
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (init As InitCommonControlsExType) As Boolean
Private Type InitCommonControlsExType
dwSize As Long 'size of this structure
dwICC As Long 'flags indicating which classes to be initialized
End Type
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Function InitCommonControls() As Boolean
Dim InitCC As InitCommonControlsExType
With InitCC
.dwSize = Len(InitCC)
.dwICC = ICC_USEREX_CLASSES
End With
InitCommonControls = InitCommonControlsEx(InitCC) 'initialize the common controls
End Function
Private Sub Form_Initialize()
Dim os As OSVERSIONINFO
os.dwOSVersionInfoSize = Len(os)
GetVersionEx os
If os.dwMajorVersion >= 5 Then InitCommonControls
End Sub
Note :
Skip the previous step if the startup form has already a common-controls control such as progress bar
Then ,
use the attached XP Styler program to add XP Styles to your programs
XP Styler can be used also as An ADD-In to make your application "XP-Styled " automatically on compile !
You can make VB6 itself XP-Styled !
Now Enjoy your XP Styled Program !!

