The title says it already - this is a project which shows how to use the
uxTheme.dll (without any involvement of the comctl32.dll), to render directly
onto the default-hWnd of a VB6-UserControl.
In the compiled binary are currently hosted (and publically available on the outside):
- cGDIPlusCache.cls (a Class to manage resource-loading from ByteArrays or Files "outside of any Control" - it's comparable to an ImageList, but supports PNG and HighQuality-resizing)
- cSubClass.cls (a simple SubClasser, which the Controls are using - but it's also available on the outside)
- ucFrame.ctl (a transparent, unicode-aware replacement for the VB.Frame-Control - interface-calling-compatible)
- ucSSTab.ctl (also unicode-aware and nearly 100% compatible to the original, with the exception of the Property .TabSelIdx (instead of just .Tab as the original is using).
Here's what the two Controls look like "in action" on a Win8-machine (with Scaling at 100% = 96dpi):
![]()
And here the same Form on Win-XP (running with a Desktop-Scaling of 125% = 120dpi):
![]()
As already mentioned, due to the quite high compatibility of the two Controls, one should be able
to just replace (on a given "old Form" with original SSTabs and VB.Frames) the appropriate:
ProgID in the ... " Begin ProgID ControlName " lines of a VB-*.frm ...
All the old terms: TabDlg.SSTab ... can be replaced with: ThemedControls.ucSSTab
and the terms/ProgIDs: VB.Frame ... can be replaced with: ThemedControls.ucFrame
I've done this Search/Replace within a TextEditor on this original Form here (which is included in the Demo-Project):
![]()
And the result which came out (since I use the same PropBag-formats as the original) after loading the replaced-*.frm file was:
![]()
So, in case you feel encouraged to work on this project (to enhance it about other uxTheme-based
VB.compatible Controls like e.g. CommandButtons, OptionBoxes, CheckBoxes - please post back here,
so that it can be included into the Main-OCX-Zip (which I would update when new interesting stuff comes in).
Oh, and yes, the ucSSTab-replacement is "DesignTime-clickable" (tab-container-wise) -
it also doesn't have the "Focus- and Tabbing-issues" of the original. What's missing currently
(as an enhancement on top of the old SSTab) is Auto-Focusing of contained Controls on Tab-Switch -
but I leave that for interested developers who want to contribute such an extension... ;)
Here's the Zip: http://vbRichClient.com/Downloads/ThemedControls.zip
(please compile the OCX first into its \CtlSource\-SubFolder - after that you can run the Demo in the ThemedControls-MainFolder.
Have fun...
Olaf
uxTheme.dll (without any involvement of the comctl32.dll), to render directly
onto the default-hWnd of a VB6-UserControl.
In the compiled binary are currently hosted (and publically available on the outside):
- cGDIPlusCache.cls (a Class to manage resource-loading from ByteArrays or Files "outside of any Control" - it's comparable to an ImageList, but supports PNG and HighQuality-resizing)
- cSubClass.cls (a simple SubClasser, which the Controls are using - but it's also available on the outside)
- ucFrame.ctl (a transparent, unicode-aware replacement for the VB.Frame-Control - interface-calling-compatible)
- ucSSTab.ctl (also unicode-aware and nearly 100% compatible to the original, with the exception of the Property .TabSelIdx (instead of just .Tab as the original is using).
Here's what the two Controls look like "in action" on a Win8-machine (with Scaling at 100% = 96dpi):

And here the same Form on Win-XP (running with a Desktop-Scaling of 125% = 120dpi):

As already mentioned, due to the quite high compatibility of the two Controls, one should be able
to just replace (on a given "old Form" with original SSTabs and VB.Frames) the appropriate:
ProgID in the ... " Begin ProgID ControlName " lines of a VB-*.frm ...
All the old terms: TabDlg.SSTab ... can be replaced with: ThemedControls.ucSSTab
and the terms/ProgIDs: VB.Frame ... can be replaced with: ThemedControls.ucFrame
I've done this Search/Replace within a TextEditor on this original Form here (which is included in the Demo-Project):

And the result which came out (since I use the same PropBag-formats as the original) after loading the replaced-*.frm file was:

So, in case you feel encouraged to work on this project (to enhance it about other uxTheme-based
VB.compatible Controls like e.g. CommandButtons, OptionBoxes, CheckBoxes - please post back here,
so that it can be included into the Main-OCX-Zip (which I would update when new interesting stuff comes in).
Oh, and yes, the ucSSTab-replacement is "DesignTime-clickable" (tab-container-wise) -
it also doesn't have the "Focus- and Tabbing-issues" of the original. What's missing currently
(as an enhancement on top of the old SSTab) is Auto-Focusing of contained Controls on Tab-Switch -
but I leave that for interested developers who want to contribute such an extension... ;)
Here's the Zip: http://vbRichClient.com/Downloads/ThemedControls.zip
(please compile the OCX first into its \CtlSource\-SubFolder - after that you can run the Demo in the ThemedControls-MainFolder.
Have fun...
Olaf