A: 

There's the IsThemeActive WinAPI function.

Konrad Rudolph
+2  A: 

Try using a combination of GetCurrentThemeName (MSDN Page) and DwmIsCompositionEnabled

I linked the first to PInvoke so you can just drop it in your code, and for the second one you can use the code provided in the MSDN comment:

[DllImport("dwmapi.dll", PreserveSig = false)]
public static extern bool DwmIsCompositionEnabled();

See what results you get out of those two functions; they should be enough to determine when you want to use a different theme!

Daniel Jennings
+1  A: 

Personally, I use the following to see if the app is running under themed:

if (Application.RenderWithVisualStyles)
{
    // you're themed
}
Richard Morgan