473,396 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Classic / XP theme

Hi,

I'm writing a WinForms app in C# and would like to alter the button images
on the toolbar depending on whether the user is using the WinXP theme or the
Classic theme. Changing the image list is the easy bit, but does anyone have
any code for detecting which theme is currently in use?

Any assistance gratefully recevied.

Best regards,

Mark Rae
Nov 16 '05 #1
6 2866
Hey Mark,

I did a search in Google and found this:
http://codeproject.com/csharp/xptheme.asp

Hope this helps

-Donald

"Mark Rae" <ma**@markrae.co.uk> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
Hi,

I'm writing a WinForms app in C# and would like to alter the button images
on the toolbar depending on whether the user is using the WinXP theme or the Classic theme. Changing the image list is the easy bit, but does anyone have any code for detecting which theme is currently in use?

Any assistance gratefully recevied.

Best regards,

Mark Rae

Nov 16 '05 #2
Hey Mark,

I did a search in Google and found this:
http://codeproject.com/csharp/xptheme.asp

Hope this helps

-Donald

"Mark Rae" <ma**@markrae.co.uk> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
Hi,

I'm writing a WinForms app in C# and would like to alter the button images
on the toolbar depending on whether the user is using the WinXP theme or the Classic theme. Changing the image list is the easy bit, but does anyone have any code for detecting which theme is currently in use?

Any assistance gratefully recevied.

Best regards,

Mark Rae

Nov 16 '05 #3
"Donald Smith" <St**************@Cox.net> wrote in message
news:Yajlc.40181$Fl5.14843@okepread04...
Hey Mark,

I did a search in Google and found this:
http://codeproject.com/csharp/xptheme.asp

Hope this helps


Wow! It's as easy as checking a single Registry setting...!

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\ThemeManager
ThemeActive is "1" if Windows XP, "0" if Windows Classic.

Thanks very much!

Mark
Nov 16 '05 #4
"Donald Smith" <St**************@Cox.net> wrote in message
news:Yajlc.40181$Fl5.14843@okepread04...
Hey Mark,

I did a search in Google and found this:
http://codeproject.com/csharp/xptheme.asp

Hope this helps


Wow! It's as easy as checking a single Registry setting...!

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\ThemeManager
ThemeActive is "1" if Windows XP, "0" if Windows Classic.

Thanks very much!

Mark
Nov 16 '05 #5
"Mark Rae" <ma**@markrae.co.uk> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...

Further to this, does anyone know of any way to make the standard VS.NET
Menu control look more attractive when running under one of the XP themes?
E.g.

1. Menubar and "classic" toolbar running on Windows Classic theme:
http://www.markrae.myby.co.uk/ClassicClassic.jpg

2. Menubar and "XP" toolbar running on Windows Classic theme:
http://www.markrae.myby.co.uk/ClassicXP.jpg

3. Menubar and "XP" toolbar running on Windows XP theme:
http://www.markrae.myby.co.uk/XPXP.jpg

With option 3, the menu backgrounds are clearly visible, which looks awful.
I had a similar problem with toolbars but was able to get round this by
setting the TransparentColor property of the toolbar's underlying ImageList
to the same as the toolbar itself i.e. Silver (192,192,192) - there seems to
be no way of doing this for menu controls.
Nov 16 '05 #6
"Mark Rae" <ma**@markrae.co.uk> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...

Further to this, does anyone know of any way to make the standard VS.NET
Menu control look more attractive when running under one of the XP themes?
E.g.

1. Menubar and "classic" toolbar running on Windows Classic theme:
http://www.markrae.myby.co.uk/ClassicClassic.jpg

2. Menubar and "XP" toolbar running on Windows Classic theme:
http://www.markrae.myby.co.uk/ClassicXP.jpg

3. Menubar and "XP" toolbar running on Windows XP theme:
http://www.markrae.myby.co.uk/XPXP.jpg

With option 3, the menu backgrounds are clearly visible, which looks awful.
I had a similar problem with toolbars but was able to get round this by
setting the TransparentColor property of the toolbar's underlying ImageList
to the same as the toolbar itself i.e. Silver (192,192,192) - there seems to
be no way of doing this for menu controls.
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Lauren Quantrell | last post by:
In Windows XP display Properties/Appearance users can chose between: Windows XP Style or Windows Classic Style. Is there a way in VBA to determine the user's selection? The reason: Toolbars...
5
by: Tom | last post by:
is it possible to create xp style theme with vs2003 on windows 2003 ? thanks Tom
0
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly...
2
by: Guff | last post by:
I have an MFC application that uses FlashWindowEx to notify the user of an event by minimizing a window on the taskbar and calling FlashWindowEx. This works fine except if you are using the Windows...
1
by: Jesper | last post by:
Is there a way to see if an XP user is using Windows classic theme as desktop appearance. Also how can I detect operating system. I.e. prompt for version of windows. Best regards and thanks...
1
by: Joey | last post by:
Hello, I have tried to programmatically set the theme for my master page by putting code in a "Page_PreInit" fuction in the master page's code behind. However, when I set a breakpoint there and...
0
by: Vir | last post by:
Hi! Can anyone help me with this? I`ve searching on web but nothing found. The problem is: how can I change current system theme (Classic/Basic/Glass) in my C# project? For example: let's have...
1
by: ilikewine | last post by:
The menu drop down icons (only the gray inactive icons) look horrible in Windows Classic Theme. Once they are active and have color, they look fine. If we switch to XP theme, they look just fine....
3
by: Norman Wooten | last post by:
Ok, I am a nOOb C#/NET coder, so this is probably easy.. heh heh (only been pecking is these languages for a week now, just converted from vbscript and classic asp) But anyways, I have a class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.