ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   XP Styles in Excel Form (https://www.excelbanter.com/excel-programming/331644-xp-styles-excel-form.html)

bjoeylouie[_7_]

XP Styles in Excel Form
 

I'd like to have XP styles in my Excel forms.

I'm following some instructions from VbAccelerator with no luck. I put
this code in a module:
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)
On Error GoTo 0
End Function


I put this manifest in the same directory as Excel.exe and named is
Excel.exe.manifiest.

<?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" /
<descriptionYour 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


Does anyone know how to do this? Can this also be done with 2003
styles?

Appreciate any assistance.


--
bjoeylouie
------------------------------------------------------------------------
bjoeylouie's Profile: http://www.excelforum.com/member.php...o&userid=23819
View this thread: http://www.excelforum.com/showthread...hreadid=378707



All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com