Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2005

Tip: Looking for answers? Try searching our database.

GetCurrentThemeName

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
basseman - 07 Sep 2005 17:09 GMT
Hi, is there any equivalent Set function of the GetCurrentThemeName

I want to change the WinXP Style, using the GetCurrentThemeName give me
the current active Theme, is there a way to change that programaticly ?
is there any SetCurrentThemeName ?

I went threw uxtheme.dll and I did not find any function that would do
what I want !!

thanks
Bassem
Kellie Fitton - 07 Sep 2005 18:04 GMT
Hi,

Have you used the following API's:

    SetWindowTheme()
    EnableTheming()
    EnableThemeDialogTexture()

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor
m/commctls/userex/functions/setwindowtheme.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor
m/commctls/userex/functions/enabletheming.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor
m/commctls/userex/functions/enablethemedialogtexture.asp


Kellie.
basseman - 07 Sep 2005 19:17 GMT
Hi,

yes I did try them,
they all seem to change the theme of a specific window or application

what I want is to change the theme being use by the Operating System,
the same behavior as if you go in control panel -> Display Properties
and then you change the appearance ...

Thanks
Bassem
Kellie Fitton - 07 Sep 2005 19:43 GMT
Hi,

How about the API SystemParametersInfo()

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/sy
stemparametersinfo.asp


Kellie.
basseman - 08 Sep 2005 19:01 GMT
Hi,

I loocked arround nothing much about themes !!!
there's only SPI_SETHIGHCONTRAST to enable HIGHCONTRAST but that's not
what I want ....

Bassem
Kellie Fitton - 08 Sep 2005 19:41 GMT
Hi,

Well, the API SystemParametersInfo() has two related parameters,
SPI_GETFLATMENU, SPI_SETFLATMENU, does that help your case? if not,

try this approach:

    GetDesktopWindow()
    GetSysColor()
    SetSysColors()
    InvalidateRect()

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/win
dowsuserinterface/windowing/windows/windowreference/windowfunctions/getdesktopwi
ndow.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/ge
tsyscolor.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/se
tsyscolors.asp


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_7a
no.asp


Kellie.
Christian ASTOR - 07 Sep 2005 21:14 GMT
> Hi, is there any equivalent Set function of the GetCurrentThemeName
>
> I want to change the WinXP Style, using the GetCurrentThemeName give me
> the current active Theme, is there a way to change that programaticly ?
> is there any SetCurrentThemeName ?

EnableTheming()-OpenThemeFile() (.msstyles)-ApplyTheme()
basseman - 08 Sep 2005 18:53 GMT
Where can you find those functions OpenThemeFile and ApplyTheme ?
which DLL implement them .... ?
Christian ASTOR - 08 Sep 2005 19:50 GMT
> Where can you find those functions OpenThemeFile and ApplyTheme ?
> which DLL implement them .... ?

Exp. ordinals 2 and 4 from uxtheme.dll.
LBIT - 06 Oct 2005 10:56 GMT
I can't find anything on OpenThemeFile()  or (.msstyles)-ApplyTheme()

Can anyone point me to somewhere I can find this documented (sample code
would be helpful also).

Thanks
Ben

> > Hi, is there any equivalent Set function of the GetCurrentThemeName
> >
[quoted text clipped - 3 lines]
>
> EnableTheming()-OpenThemeFile() (.msstyles)-ApplyTheme()
Sam Hobbs - 19 Oct 2005 18:05 GMT
There is not an OpenThemeFile; you probably meant OpenThemeData.

> EnableTheming()-OpenThemeFile() (.msstyles)-ApplyTheme()
Christian ASTOR - 19 Oct 2005 18:50 GMT
> There is not an OpenThemeFile; you probably meant OpenThemeData.

No.
As I said, ordinal 2 (GetProcAddress())
TC - 08 Sep 2005 05:00 GMT
> I want to change the WinXP Style,

If you do this from an application which is designed to let the user
change the current theme - fine.

But if you do it from any /other/ application, most users will place
your software gently into the large round file!

Themes are a user setting; the users (not your app) should control
them.

HTH,
TC
basseman - 08 Sep 2005 18:57 GMT
It's going to be used in the sowftware that runs in police cars and so
when they do there patrols in night, they change the theme to a
HighContrast one so the monitor screen won't illuminate the inside of
the car and when it's the day I want to be abble to restore the
original theme that they had (before they switch to night mode)

Thanks
Bassem
TC - 09 Sep 2005 10:15 GMT
Ok, understood.

I strongly recomment that you include the following line:

  if miscreant_name = "TC" then do_nothing

:-)

TC

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.