• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 416
  • Last Modified:

VB6 / Windows XP - Apply System Visual Style And Profile


The scenario is i'm making a small tool which applies themes and general settings without using the display control panel. Think along the lines of Style XP.. only much more simple.
My question is as follows. Using VB6 I want to force a system-wide theme apply. Windows has a built in ability to save all theme settings to .theme file (colours, visual style etc.) using the Display Control Panel. How can i make windows apply, for example C:\MyTheme.Theme.
Shelling the file opens the Display control panel with the theme ready to load, but you have to click 'apply'. This is not adiquate. (nor is sending a key press to apply the theme from that point). So, In a nutshell, i need to use VB6 programming code to apply a '.Theme' file.

Any code or directions which can achieve my goal will be accepted. As a compromise, i will also accept an answer which tells me how to switch visual style from classic to luna, or luna silver. If anyone knows how i can force XP to use its new 'modern' start menu instead of the 'classic' one in VB6 programming code would also be appriciated.

Thankyou in advance,

1 Solution
dgc_lexxyAuthor Commented:
Thanks for your response anv. Unfortunatly i am not looking to apply an XP Visual style to my VB application only. I am refering to the entire system. I need to change the system theme. Allow me to further elaborate.
The system loads in the 'Classic' Style. Windows Is Using the 'Classic' Theme.. I want to use programming code to switch the system from 'Classic' Style To An XP Visual Theme, Preferably By Loading A '.Theme' File Which The Display Control Panel Nativly Saves Themes To. Think along the lines that im making a display control panel replacement. Windows Is Also Using The 'Classic' **Start** Menu. If any help can be offered to use programming code/api to switch from 'classic' start menu to 'modern' start menu that would be appriciated, but i will accept any answer which completes my goal of changing the **system** theme.

Thanks Again,

hi dgc_lexxy

check the link below..

it is using Delphi .. but i feel u can easily try and make it in Vb..

add a reference to the ThemeUI ActiveX library. as mentioned in the link and  follow the steps..
giving proper syntax in VB..

try and let me know..


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

dgc_lexxyAuthor Commented:
Brilliant. ThemeUI.dll provided the required functions.
Thanks alot.
Hey Lexx, how did you get this going in the end? via VB perhaps? Would love to know how.

i get "access denied" , is the problem that iam running in sp2 where themeui.dll have some kind of security ? if iam right, then how could i use the sp1 dll ?

replay pls

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now