Hi pnp,
I never tried before. But you should look into uxtheme.dll. For more info how to call them, check this.
http://pinvoke.net
To get what is the current UI, at least i know how to do a bit.. ee.. actually learn it from codeproject.
I believe if you can do it if you know the right way to call it. Below is an example of getting what are the styles using for the current windows.
The themes are stored in the registery part of windows.
//references:
http://www.thecodeproject.com/csharp/xptheme.asp
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace TestVisualStyles
{
class CheckThemeClass
{
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("Current Windows Theme = {0}", CurrentTheme());
Console.WriteLine("Windows Theme Active = {0}", IsThemeActive());
Console.WriteLine("Application Theme Active = {0}", IsAppThemed());
Console.ReadLine();
}
public enum Themes
{
WindowsClassic,
XPBlue,
XPGreen,
XPSilver
}
public static Themes CurrentTheme()
{
RegistryKey key =
Registry.CurrentUser.OpenSubKey(
@"Software\Microsoft\Windows\CurrentVersion\ThemeManager");
if (key != null)
{
if ("1" == (string) key.GetValue("ThemeActive"))
{
string s = (string) key.GetValue("ColorName");
if (s != null)
{
if (String.Compare(s, "NormalColor", true) == 0)
return Themes.XPBlue;
if (String.Compare(s, "HomeStead", true) == 0)
return Themes.XPGreen;
if (String.Compare(s, "Metallic", true) == 0)
return Themes.XPSilver;
}
}
}
return Themes.WindowsClassic;
}
[DllImport("uxtheme.dll", SetLastError=true)]
public static extern bool IsThemeActive();
[DllImport("uxtheme.dll", SetLastError=true)]
public static extern bool IsAppThemed();
}
}
Hope it helps.