by Jonathan Liu (9 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 7th February 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Windows XP Controls Initialiser 1.0 This module adds support for the Windows XP themes engine by automatically configuring your application on
API Declarations
'by Buttress Root Software
'
'Programmed by Jonathan Liu
'Copyright ©1999-2371 Buttress Root Software. All rights reserved.
'
'How to use:
'1. Add the module to your project
'2. If you are using Windows Common Controls, make sure it uses Comctl32.dll
'3. Add "Call InitialiseXPControls" to your startup code
' (usually "Private Sub Form_Initialize()" or "Sub Main()")
'
'Issues and fixes
'----------------
'Issue: Command buttons display incorrectly when contained
' in frames
'Fix: 1. Select controls contained within the frame
' 2. Cut the controls
' 3. Paste it on the form (not on the frame)
' 4. Move the controls to their previous location on the frame
' 5. Right click on the selected controls
' 6. Click on "Bring to Front"
' 7. Click on the frame
' 8. Click on "Send to Back"
Option Explicit
Private Declare Function InitCommonControls Lib "Comctl32.dll" () As Long
Sub InitialiseXPControls()
Dim intFreeFile As Integer
Dim lngReturn As Long
Dim strEXEFile As String
Dim strManifestFile As String
strEXEFile = App.Path & "\" & App.EXEName & ".exe"
strManifestFile = strEXEFile & ".manifest"
If Dir(strEXEFile) <> "" And Dir(strManifestFile) = "" Then
intFreeFile = FreeFile()
Open strManifestFile For Output As #intFreeFile
Print #intFreeFile, "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>"
Print #intFreeFile, "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">"
Print #intFreeFile, "<assemblyIdentity"
Print #intFreeFile, " version = ""1.0.0.0"""
Print #intFreeFile, " processorArchitecture = ""X86"""
Print #intFreeFile, " name = ""Microsoft.Winweb.VB_Application"""
Print #intFreeFile, " type=""win32"""
Print #intFreeFile, "/>"
Print #intFreeFile, "<description>.NET control deployment tool</description>"
Print #intFreeFile, "<dependency>"
Print #intFreeFile, " <dependentAssembly>"
Print #intFreeFile, " <assemblyIdentity"
Print #intFreeFile, " type=""win32"""
Print #intFreeFile, " name = ""Microsoft.Windows.Common-Controls"""
Print #intFreeFile, " version = ""6.0.0.0"""
Print #intFreeFile, " processorArchitecture = ""X86"""
Print #intFreeFile, " publicKeyToken = ""6595b64144ccf1df"""
Print #intFreeFile, " language = ""*"""
Print #intFreeFile, " />"
Print #intFreeFile, " </dependentAssembly>"
Print #intFreeFile, "</dependency>"
Print #intFreeFile, "</assembly>"
Close #intFreeFile
Shell strEXEFile, vbNormalFocus
End
End If
lngReturn = InitCommonControls()
End Sub
No comments have been posted about Windows XP Controls Initialiser 1.0 This module adds support for the Windows XP themes engine by au. Why not be the first to post a comment about Windows XP Controls Initialiser 1.0 This module adds support for the Windows XP themes engine by au.