Это то, что я делаю во всех моих приложениях VB6, только когда-либо тестировалось в отдельном EXE, поэтому не уверен, что он будет работать как OCX.
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
Public Sub Main()
InitCommonControlsVB
'
' Start your application here:
'
End Sub
Создайте файл, подобный этому: http://pastebin.com/f689388b2
Затем вы добавляете файл манифеста в файл ресурсов с типом RT_MANIFEST (24)
Я не могу точно вспомнить, нужно ли вам это делать, потому что сейчас я всегда использую один и тот же готовый файл .res.
Источник: http://www.vbaccelerator.com/home/vb/code/libraries/XP_Visual_Styles/Using_XP_Visual_Styles_in_VB/article.asp