|
-
Jun 25th, 2023, 05:47 AM
#11
Re: Windows 10 Dark Mode & VB6 apps
 Originally Posted by Mith
my VB6 code:
Code:
Private Declare Function DwmSetWindowAttribute Lib "dwmapi.dll" (ByVal HWND As Long, ByVal dwAttribute As Long, ByRef pvAttribute As Long, ByVal cbAttribute As Long) As Long
Private Const DWMWA_USE_IMMERSIVE_DARK_MODE = 20
Private Sub Form_Load()
Dim bValue As Long
bValue = 1
Call DwmSetWindowAttribute(Me.hWnd, DWMWA_USE_IMMERSIVE_DARK_MODE, bValue, LenB(bValue))
End Sub
I'm starting to think that Dark Mode isn't possible with VB6...
Works as it should here in my IDE on Win11 (which I have running "manifested, enabling Themes").
I'm quite sure, that all this DWM-stuff only works properly, when you include a proper manifest (either in your compiled Exe, or in the IDE itself).
Olaf
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|