Jump to content

Recommended Posts

Posted

If anyone can help with this I would be most greatful..

I have a custom theme that I have created for Windows XP. I goto the display properties, and select the Theme, then click OK and the theme is applied.

What I need to do is to automate the process of clicking that OK button to apply the theme.

I was thinking of writing a VB app to do this, but I am stuck before I've started! I know how to import the registry settings, but how can I program the 'click of the OK button.' I am assuming it will be some kind of API call that windows uses. Ive looked on Technet and google but I've found nothing,

Can anyone help, please?????

Thanks

PAul :)


Posted

Glowy,

Thanks for the quick response. The thing is I need to do the 'aforementioned' without having dialog boxes popup etc.

The reason being that this solution needs to be used on hundreds of machines..

Any other idea's welcomed.

(thanks for the idea Glowy!)

P :)

Posted

You can use a VBScript instead of a VB App to apply the theme immediately

Depending where your theme is in the list, you just play with the line WSS.SendKeys "{DOWN}" or WSS.SendKeys "{UP}" for selecting your theme.

settheme.vbs

Set WSS = CreateObject("WScript.Shell")

WSS.Run "CONTROL.EXE DESK.CPL"

WScript.Sleep 500                'if your computer is slow increase this value
WSS.SendKeys "{DOWN}"    'line for selecting your theme before {ENTER}
WSS.SendKeys "{DOWN}"    'line for selecting your theme before {ENTER}
WSS.SendKeys "{ENTER}"    'apply your theme and close display panel

If you want a VB App with a button you will need a window to click a button anyway.

  • 2 weeks later...
Posted

The problem is that sendkeys sucks - it can be interupted by the user and you see what is happening on the screen. I want it to be a seamless change for the user :)

Posted

OK.

I know that the API that I need to use is setCurrentTheme , but where can I find syntax for this?

I have googled and looked on technet but I haven't found a thing out!!

Any idea's??? :)

Posted

:)

Well, I can't believe that there is no way of doing this - it MUST be possible because WindowsBlinds exists...

Does anyone out there know how to get a list of the API names from the uxtheme, user etc etc dll files.. that would be a great help. I need to figure out the syntax to these calls and then I can get it working..

So far, I have a form in vb6 that when you check a tickbox it enables or disables the current WINDOWS theme !! :-0 (works with Luna anyway)..

Picking one , loading it and setting it however is a nightmare!

Does anyone have any idea's??? I cant believe Ive come this far with it and cant get any further down the road...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...