Hi there,

I'm using Manifest application styling method found on this forum:

- added a manifest file to RES file
- made a module and then calling InitComCtls

Resource file content:
Code:
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST 24

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "RDWRC.exe.manifest"
Module content:

Code:
Option Explicit

Private Const ICC_STANDARD_CLASSES As Long = &H4000&

Private Type tagINITCOMMONCONTROLSEX
 dwSize  As Long
 dwICC   As Long
End Type

Private Declare Function InitShell Lib "shell32" Alias "IsUserAnAdmin" () As Long
Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As Any) As Boolean


Public Sub InitComCtls()
 On Error Resume Next
 
 Dim lgRet As Long
 
 Dim ICC As tagINITCOMMONCONTROLSEX

 With ICC
  .dwSize = Len(ICC)
  .dwICC = ICC_STANDARD_CLASSES
 End With

 Call InitShell
 
 lgRet = InitCommonControlsEx(ICC)

 If lgRet = 0 Or Err.Number <> 0 Then
  Call InitCommonControls ' 9x version
 End If
    
 Exit Sub
End Sub
Call procedure:

Code:
Private Sub Form_Initialize()
 On Error Resume Next
 
 Call InitComCtls
 
 Exit Sub
End Sub
The thing is that, how I see, the code above does not have any effect/function, it's working without the code is called.
Any thoughts about it?

But my real questions are:

After implementing the Manifest styling, I can't change the forecolor of any object, I'm talking here especially about Frame forecolor (can't change from blue to black, shown on image bellow).

And a second thing is that, my Command buttons located in a Frame got black framed arround, but I don't know why.

These weird things are only shown on Windows XP, but on Windows 7 and Windows 10 are showing up just great.

Name:  manifest_style.png
Views: 1084
Size:  18.3 KB

Any help would be appreciated!

Thank you!