PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Anonymous on November 11, 2004, 04:25:27 AM

Title: Are themes being used?
Post by: Anonymous on November 11, 2004, 04:25:27 AM
Is there an easy way to tell if the program is being run with or without themes?  

Thanks!

John
Title: Are themes being used?
Post by: TechSupport on November 11, 2004, 10:51:17 AM
Good question. I can't think of a way to do it currently unless you can somehow query the application's resource file to search for the information that FireFly puts there for Theme support.

The best alternative is for me to add a new element to FireFly's App variable.

e.g.
App.IsWinXPThemeActive

That should be very easy for me to implement.
Title: Are themes being used?
Post by: Anonymous on November 11, 2004, 02:00:48 PM
Thanks!  That'd be really helpful for me.  -John
Title: Are themes being used?
Post by: Roger Garstang on November 12, 2004, 12:58:10 AM
What good would that be though?  If the app is designed with XP Themes enabled then it will already be known.  I think what he means is if XP Themes are currently on in the OS and thus would effect the app.  Like say if the theme option is on in the app then when running in a non-themed environment they still wouldn't be applied, but if in a themed environment then they would.  Maybe I'm reading it wrong, but to me I'd alread know if my app has themes enabled, but not if the OS does.

Might be able to poll the dll some way.  Like try calling a part of the theme API, etc. I think I've seen code over at PB sometime back about this.
Title: Are themes being used?
Post by: Anonymous on November 12, 2004, 04:25:04 AM
Thanks Roger, that is exactly what I meant to say.

Between this and the other thread, I think I have to stop posting messages after 2AM so that I have enough brain power to write them :)

-John
Title: Are themes being used?
Post by: TechSupport on November 12, 2004, 09:03:17 AM
Well in that case, a simple call to the operating system will reveal whether the themes are currently active. I don't have the link handy but Borje posted code on the PB Forums that does exactly that. Do a search for "IsThemed" - I think that was what it is called. I will look for it later today if someone else doesn't find it first.
Title: Are themes being used?
Post by: Haakon Birkeland on November 12, 2004, 11:15:58 AM
You got other important issues to deal with, so I looked it up.

XP code - IsThemeActive - www.powerbasic.com/support/forums/Forum7/HTML/002004.html
Title: Are themes being used?
Post by: Anonymous on November 12, 2004, 01:43:16 PM
Thanks! -John
Title: Are themes being used?
Post by: TechSupport on November 12, 2004, 04:55:48 PM
Thanks Haakon, that's the one that I was thinking about.

:thumbsup: