Are themes being used?

Started by Anonymous, November 11, 2004, 04:25:27 AM

Previous topic - Next topic

Anonymous

Is there an easy way to tell if the program is being run with or without themes?  

Thanks!

John

TechSupport

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.

Anonymous

Thanks!  That'd be really helpful for me.  -John

Roger Garstang

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.

Anonymous

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

TechSupport

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.

Haakon Birkeland

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

Anonymous


TechSupport

Thanks Haakon, that's the one that I was thinking about.

:thumbsup: