Hello
I've searched the forums, microsoft and google but i haven't found a thing. I need to list all the available XP themes, and if possible to set one. Thanks
Printable View
Hello
I've searched the forums, microsoft and google but i haven't found a thing. I need to list all the available XP themes, and if possible to set one. Thanks
Maybe some of the API's here will be useful.
Thanks, but i still don't understand much of it :(. I'm trying to mess around with it but i don't know the API calls so its a bit hard.
Ok does anyone have the api calls in visual basic. Thanks
just search for them in google 'vb FunctionName':
here's three for starters
VB Code:
Private Declare Function OpenThemeData Lib "uxtheme.dll" _ (ByVal hWnd As Long, ByVal pszClassList As Long) As Long Private Declare Function CloseThemeData Lib "uxtheme.dll" _ (ByVal hTheme As Long) As Long Private Declare Function GetCurrentThemeName Lib "uxtheme.dll" ( _ ByVal pszThemeFileName As Long, _ ByVal dwMaxNameChars As Long, _ ByVal pszColorBuff As Long, _ ByVal cchMaxColorChars As Long, _ ByVal pszSizeBuff As Long, _ ByVal cchMaxSizeChars As Long _ ) As Long
Just found this thread in C# forum. The conversion may not me very hard.
here's some pscode for getting the current style: http://www.planetsourcecode.com/vb/s...53379&lngWId=1
Thanks i'll check them out.
I found this as well but it doesn't return all the available themes, and sadly the the two links above are very similar. The closest thing i have found is to use the folder 'C:\WINDOWS\Resources\Themes' and just get the themes from that. Anyway thanks everyone for the help.
you could launch the Display Properties dialog box hidden, and then pull the information from the comboboxes with API:
VB Code:
Call Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,5", vbHide)
that launches it with the Themes tab on top.
http://vbnet.mvps.org/index.html?cod...ontrolpnl5.htm
Hi there, check out the attachment, it might do what you wanted.
The only problem is that no matter what state you put in the shell call it still loads up vbNormalFocus, stupid thing.
I've stuck in a
to hide it, but you still get a brief flash.VB Code:
ShowWindow lDisplayhWnd, 0&
Aside from that it seems to work fine. You'd have to develop it to be able to change the colour of the XP theme (it's a different tab), but it shouldn't be too difficult. :)
Now if it would only launch hidden! :mad:
My codeBank thread on detecting XP themes should help. :)
http://www.vbforums.com/showthread.php?t=378272
bushmobile: Thanks its great, but unfortunetly i can't use this as i am trying to make a copy of the display properties, and where i need to use it, they probably have disabled it.
RobDog: Thanks but it only gets the current theme.
I suppose currently there is not way so i'll leave it till later.
Thanks everyone
The MS themes are located in the Resources folder under the Windows directory. ;)
Keep up RobDog ;)Quote:
Originally Posted by Andrew G
Do custom third party themes also install to the same location? I dont want to install any but if anyone knows... :)
@RobDog888,
To apply 3rd party themes, first you'll need to patch uxtheme.dll
Don't worry. I'm here to help you. :DQuote:
Do custom third party themes also install to the same location? I dont want to install any but if anyone knows...
I've tried at least 50 3rd party theme. It actually depends on the theme.
If the theme uses default XP elements - like start button, images - then probably it woun't need any other files except the .theme file.
XP doesn't copy the theme file in your profile by default. You have to manually copy them.
But if the theme is more advanced - i.e. it replaces your start button/taskbar/window styles - then it will need a dll (?) to provide those resources. Most of the time, these themes comes with an installer, they take care of everything.
Here is a quote from a book "Hacking Windows® XP" it explains about how to enable your own visual styles.
Quote:
Originally Posted by Hacking Windows® XP
Somewhere on the Windows MarketPlace website, I found that the UXTheme Patch was also on there for a weird reason.
I'll send a link soon.
PS.Is Windows MP a universal download site,because that's the only reason i think the UXT patch is on there.
I know this is old, but maybe it'll help someone. I'm not sure if ALL themes fit this or not (I think they do) but most are in the c:\windows\resources\themes directory. some simple code could get a list of all theme files in that directory. again not sure, but I think all themes must b in this folder to be used. hope it helps!
post #9 - 11 months agoQuote:
Originally Posted by Andrew G
LOL ..
and changing the theme ..
http://www.vbforums.com/showthread.p...62#post2738462
lol, i've completely forgotten about this :p
Rory.. thanks, i've tried the example in the link you posted, but it still uses the properties box, and on the computer i'm going to be using it will have it disabled. I've given up on the idea, and since Vista is out, even if i do make the program, it probably won't work once they update the system. So thanks anyway :)
well i only use that so it changes it on the fly ..Quote:
Originally Posted by Andrew G
you can still change it in the registry then restart the PC for the changes to take effect ,,
PS. why is the display properties disabled?
PSS. Tell them stay far far away from Vista :p
PSSS. You could probably use WMI to list all the themes also ..
or just do what one poster said .. use the themes folder ..
actually its in the registry also ..
I basically wrote a program before that would change the system colours on the computer at school and to change the resolution (some one kept leaving them on 640x480 :sick:). But i lost the code, so I've decided to rewrite it, but wanted to include extra features such as changing theme, screen saver etc. But I'm now at uni, and they've disabled all programs from running (except a select few) so I'm not gonna bother with trying to bypass it, just to create a program that would apply the gray theme instead of the blue :p
well here is the screen resolution .. :)
http://www.vbforums.com/showthread.p...60#post2652660
I've already done most of the program including the resolution, system colours, background. the only missing things where the screensaver (which i had decided was going to be useless anyway since I would hardly see it) and the themes.