OMID SOFT Posted December 23, 2007 Posted December 23, 2007 Public Function CurrentTheme() As String 'Function to get the current Windows XP theme. 'Optional: You can use it to set different colors for each theme. Dim key As RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\ThemeManager") If key IsNot Nothing Then If "1" = (key.GetValue("ThemeActive").ToString) Then Dim s As String s = (key.GetValue("ColorName")).ToString() If s <> Nothing Then If String.Compare(s, "NormalColor", True) = 0 Then CurrentTheme = "XPBlue" : Exit Function If String.Compare(s, "HomeStead", True) = 0 Then CurrentTheme = "XPGreen" : Exit Function If String.Compare(s, "Metallic", True) = 0 Then CurrentTheme = "XPSilver" : Exit Function End If End If End If CurrentTheme = "WindowsClassic" End Function Quote Don't ask what your country can do for you, ask what you can do for your country...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.