From 04f46255cea2137e69989352a3e34c286d13d3f2 Mon Sep 17 00:00:00 2001
From: Abdelrhman-AK <59510211+Abdelrhman-AK@users.noreply.github.com>
Date: Sat, 13 Aug 2022 17:06:53 +0200
Subject: [PATCH] 1.0.5.0
---
WinPaletter/ApplicationEvents.vb | 106 +++++----
WinPaletter/Classes/CP.vb | 364 ++++++++++++++++---------------
WinPaletter/Classes/XenonCore.vb | 2 -
WinPaletter/GUI/XenonUI.vb | 4 +-
WinPaletter/Win32UI.vb | 16 +-
WinPaletter/WinPaletter.vbproj | 1 +
6 files changed, 265 insertions(+), 228 deletions(-)
diff --git a/WinPaletter/ApplicationEvents.vb b/WinPaletter/ApplicationEvents.vb
index db053767..52b2b629 100644
--- a/WinPaletter/ApplicationEvents.vb
+++ b/WinPaletter/ApplicationEvents.vb
@@ -13,6 +13,8 @@ Namespace My
Public Module WindowsVersions
Public W11 As Boolean
Public W10 As Boolean
+ Public W8 As Boolean
+ Public W7 As Boolean
End Module
Partial Friend Class MyApplication
@@ -129,43 +131,59 @@ Namespace My
#Region "Wallpaper Change Detector"
Sub Monitor()
Dim currentUser = WindowsIdentity.GetCurrent()
+ Dim KeyPath As String
+ Dim valueName As String
+ Dim Base As String
- Dim KeyPath As String = "Control Panel\Desktop"
- Dim valueName As String = "Wallpaper"
- Dim Base As String = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
- Dim query1 = New WqlEventQuery(Base)
- WallMon_Watcher1 = New ManagementEventWatcher(query1)
-
-
- KeyPath = "Control Panel\Colors"
- valueName = "Background"
- Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
- Dim query2 = New WqlEventQuery(Base)
- WallMon_Watcher2 = New ManagementEventWatcher(query2)
-
-
- KeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers"
- valueName = "BackgroundType"
- Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
- Dim query3 = New WqlEventQuery(Base)
- WallMon_Watcher3 = New ManagementEventWatcher(query3)
-
- KeyPath = "Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
- valueName = "AppsUseLightTheme"
- Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
- Dim query4 = New WqlEventQuery(Base)
- WallMon_Watcher4 = New ManagementEventWatcher(query4)
-
- AddHandler WallMon_Watcher1.EventArrived, AddressOf Wallpaper_Changed
- AddHandler WallMon_Watcher2.EventArrived, AddressOf Wallpaper_Changed
- AddHandler WallMon_Watcher3.EventArrived, AddressOf WallpaperType_Changed
- AddHandler WallMon_Watcher4.EventArrived, AddressOf DarkMode_Changed
-
- WallMon_Watcher1.Start()
- WallMon_Watcher2.Start()
- WallMon_Watcher3.Start()
- WallMon_Watcher4.Start()
+ Try
+ KeyPath = "Control Panel\Desktop"
+ valueName = "Wallpaper"
+ Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
+ Dim query1 = New WqlEventQuery(Base)
+ WallMon_Watcher1 = New ManagementEventWatcher(query1)
+ Catch
+ End Try
+
+
+ Try
+ KeyPath = "Control Panel\Colors"
+ valueName = "Background"
+ Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
+ Dim query2 = New WqlEventQuery(Base)
+ WallMon_Watcher2 = New ManagementEventWatcher(query2)
+ Catch
+ End Try
+
+
+ Try
+ KeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers"
+ valueName = "BackgroundType"
+ Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
+ Dim query3 = New WqlEventQuery(Base)
+ WallMon_Watcher3 = New ManagementEventWatcher(query3)
+ Catch
+ End Try
+
+ Try
+ KeyPath = "Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
+ valueName = "AppsUseLightTheme"
+ Base = String.Format("SELECT * FROM RegistryValueChangeEvent WHERE Hive='HKEY_USERS' AND KeyPath='{0}\\{1}' AND ValueName='{2}'", currentUser.User.Value, KeyPath.Replace("\", "\\"), valueName)
+ Dim query4 = New WqlEventQuery(Base)
+ WallMon_Watcher4 = New ManagementEventWatcher(query4)
+ Catch
+ End Try
+
+ Try : AddHandler WallMon_Watcher1.EventArrived, AddressOf Wallpaper_Changed : Catch : End Try
+ Try : AddHandler WallMon_Watcher2.EventArrived, AddressOf Wallpaper_Changed : Catch : End Try
+ Try : AddHandler WallMon_Watcher3.EventArrived, AddressOf WallpaperType_Changed : Catch : End Try
+ Try : AddHandler WallMon_Watcher4.EventArrived, AddressOf DarkMode_Changed : Catch : End Try
+
+ Try : WallMon_Watcher1.Start() : Catch : End Try
+ Try : WallMon_Watcher2.Start() : Catch : End Try
+ Try : WallMon_Watcher3.Start() : Catch : End Try
+ Try : WallMon_Watcher4.Start() : Catch : End Try
End Sub
+
Sub DarkMode_Changed()
Dim UpdateDarkModeX As UpdateDarkModeDelegate = AddressOf UpdateDarkMode
MainForm.Invoke(UpdateDarkModeX)
@@ -194,6 +212,8 @@ Namespace My
Sub WallpaperType_Changed(sender As Object, e As EventArrivedEventArgs)
Dim R1 As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers", False)
+ If R1.GetValue("BackgroundType", Nothing) Is Nothing Then R1.SetValue("BackgroundType", 0, RegistryValueKind.DWord)
+
Dim R2 As RegistryKey = Registry.CurrentUser.OpenSubKey("Control Panel\Desktop", False)
Dim S As New Stopwatch
@@ -220,6 +240,7 @@ Namespace My
Public Function GetCurrentWallpaper() As Bitmap
Dim R1 As RegistryKey = Registry.CurrentUser.OpenSubKey("Control Panel\Desktop", False)
Dim R2 As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers", False)
+ If R2.GetValue("BackgroundType", 0) Is Nothing Then R1.SetValue("BackgroundType", 0, RegistryValueKind.DWord)
Dim WallpaperPath As String = R1.GetValue("Wallpaper").ToString()
Dim WallpaperType As Integer = R2.GetValue("BackgroundType")
@@ -247,17 +268,10 @@ Namespace My
End Function
Sub DetectOS()
- Try
- W11 = My.Computer.Info.OSFullName.Contains("11")
- Catch
- W11 = False
- End Try
-
- Try
- W10 = My.Computer.Info.OSFullName.Contains("10")
- Catch
- W10 = False
- End Try
+ W11 = My.Computer.Info.OSFullName.Contains("11")
+ W10 = My.Computer.Info.OSFullName.Contains("10")
+ W8 = My.Computer.Info.OSFullName.Contains("8")
+ W7 = My.Computer.Info.OSFullName.Contains("7")
End Sub
Private Sub MyApplication_Shutdown(sender As Object, e As EventArgs) Handles Me.Shutdown
diff --git a/WinPaletter/Classes/CP.vb b/WinPaletter/Classes/CP.vb
index 27b11c1e..54fc38b7 100644
--- a/WinPaletter/Classes/CP.vb
+++ b/WinPaletter/Classes/CP.vb
@@ -386,59 +386,66 @@ Public Class CP
#End Region
#Region "Modern Windows"
+ If Not My.W7 And Not My.W8 Then
+ Dim x As Byte() = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette", Nothing)
+ Colors.Add(Color.FromArgb(255, x(0), x(1), x(2)))
+ Colors.Add(Color.FromArgb(255, x(4), x(5), x(6)))
+ Colors.Add(Color.FromArgb(255, x(8), x(9), x(10)))
+ Colors.Add(Color.FromArgb(255, x(12), x(13), x(14)))
+ Colors.Add(Color.FromArgb(255, x(16), x(17), x(18)))
+ Colors.Add(Color.FromArgb(255, x(20), x(21), x(22)))
+ Colors.Add(Color.FromArgb(255, x(24), x(25), x(26)))
+ Colors.Add(Color.FromArgb(255, x(28), x(29), x(30)))
+
+ ActionCenter_AppsLinks = Colors(0)
+ Taskbar_Icon_Underline = Colors(1)
+ StartButton_Hover = Colors(2)
+ SettingsIconsAndLinks = Colors(3)
+ StartMenuBackground_ActiveTaskbarButton = Colors(4)
+ StartListFolders_TaskbarFront = Colors(5)
+ Taskbar_Background = Colors(6)
+
+ Dim y As Integer
+ y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "StartColorMenu", Nothing)
+ StartMenu_Accent = BizareColorInvertor(Color.FromArgb(y))
+
+ y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentColorMenu", Nothing)
+ Titlebar_Active = BizareColorInvertor(Color.FromArgb(y))
+
+ y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColor", Nothing)
+ Titlebar_DWM_Active = BizareColorInvertor(Color.FromArgb(y))
+
+ y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColorInactive", Nothing)
+ Titlebar_Inactive = BizareColorInvertor(Color.FromArgb(y))
+
+ WinMode_Light = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "SystemUsesLightTheme", True)
+ AppMode_Light = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", True)
+ Transparency = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", True)
+ ApplyAccentonTaskbar = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", False)
+ ApplyAccentonTitlebars = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", False)
+ End If
- Dim x As Byte() = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette", Nothing)
- Colors.Add(Color.FromArgb(255, x(0), x(1), x(2)))
- Colors.Add(Color.FromArgb(255, x(4), x(5), x(6)))
- Colors.Add(Color.FromArgb(255, x(8), x(9), x(10)))
- Colors.Add(Color.FromArgb(255, x(12), x(13), x(14)))
- Colors.Add(Color.FromArgb(255, x(16), x(17), x(18)))
- Colors.Add(Color.FromArgb(255, x(20), x(21), x(22)))
- Colors.Add(Color.FromArgb(255, x(24), x(25), x(26)))
- Colors.Add(Color.FromArgb(255, x(28), x(29), x(30)))
-
- ActionCenter_AppsLinks = Colors(0)
- Taskbar_Icon_Underline = Colors(1)
- StartButton_Hover = Colors(2)
- SettingsIconsAndLinks = Colors(3)
- StartMenuBackground_ActiveTaskbarButton = Colors(4)
- StartListFolders_TaskbarFront = Colors(5)
- Taskbar_Background = Colors(6)
-
- Dim y As Integer
- y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "StartColorMenu", Nothing)
- StartMenu_Accent = BizareColorInvertor(Color.FromArgb(y))
-
- y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentColorMenu", Nothing)
- Titlebar_Active = BizareColorInvertor(Color.FromArgb(y))
-
- y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColor", Nothing)
- Titlebar_DWM_Active = BizareColorInvertor(Color.FromArgb(y))
-
- y = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColorInactive", Nothing)
- Titlebar_Inactive = BizareColorInvertor(Color.FromArgb(y))
-
- WinMode_Light = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "SystemUsesLightTheme", True)
- AppMode_Light = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", True)
- Transparency = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", True)
- ApplyAccentonTaskbar = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", False)
- ApplyAccentonTitlebars = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", False)
#End Region
#Region "LogonUI"
- With My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Background", "0 0 0")
- LogonUI_Background = Color.FromArgb(255, .ToString.Split(" ")(0), .ToString.Split(" ")(1), .ToString.Split(" ")(2))
- End With
+ If Not My.W7 And Not My.W8 Then
+ Dim y As Integer
+
+ With My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Background", "0 0 0")
+ LogonUI_Background = Color.FromArgb(255, .ToString.Split(" ")(0), .ToString.Split(" ")(1), .ToString.Split(" ")(2))
+ End With
- y = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Background", Nothing)
- LogonUI_PersonalColors_Background = BizareColorInvertor(Color.FromArgb(y))
+ y = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Background", Nothing)
+ LogonUI_PersonalColors_Background = BizareColorInvertor(Color.FromArgb(y))
- y = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Accent", Nothing)
- LogonUI_PersonalColors_Accent = BizareColorInvertor(Color.FromArgb(y))
+ y = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Accent", Nothing)
+ LogonUI_PersonalColors_Accent = BizareColorInvertor(Color.FromArgb(y))
+
+ LogonUI_DisableAcrylicBackgroundOnLogon = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableAcrylicBackgroundOnLogon", False)
+ LogonUI_DisableLogonBackgroundImage = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableLogonBackgroundImage", False)
+ LogonUI_NoLockScreen = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "NoLockScreen", False)
+ End If
- LogonUI_DisableAcrylicBackgroundOnLogon = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableAcrylicBackgroundOnLogon", False)
- LogonUI_DisableLogonBackgroundImage = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableLogonBackgroundImage", False)
- LogonUI_NoLockScreen = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "NoLockScreen", False)
#End Region
#Region "Win32UI"
@@ -957,33 +964,38 @@ Public Class CP
#End Region
#Region "Modern Windows"
- If lin.StartsWith("*WinMode_Light= ") Then WinMode_Light = lin.Remove(0, "*WinMode_Light= ".Count)
- If lin.StartsWith("*AppMode_Light= ") Then AppMode_Light = lin.Remove(0, "*AppMode_Light= ".Count)
- If lin.StartsWith("*Transparency= ") Then Transparency = lin.Remove(0, "*Transparency= ".Count)
- If lin.StartsWith("*AccentColorOnTitlebarAndBorders= ") Then ApplyAccentonTitlebars = lin.Remove(0, "*AccentColorOnTitlebarAndBorders= ".Count)
- If lin.StartsWith("*AccentColorOnStartTaskbarAndActionCenter= ") Then ApplyAccentonTaskbar = lin.Remove(0, "*AccentColorOnStartTaskbarAndActionCenter= ".Count)
- If lin.StartsWith("*Titlebar_Active= ") Then
- Titlebar_Active = Color.FromArgb(lin.Remove(0, "*Titlebar_Active= ".Count))
- Titlebar_DWM_Active = Titlebar_Active
+ If Not My.W7 And Not My.W8 Then
+
+ If lin.StartsWith("*WinMode_Light= ") Then WinMode_Light = lin.Remove(0, "*WinMode_Light= ".Count)
+ If lin.StartsWith("*AppMode_Light= ") Then AppMode_Light = lin.Remove(0, "*AppMode_Light= ".Count)
+ If lin.StartsWith("*Transparency= ") Then Transparency = lin.Remove(0, "*Transparency= ".Count)
+ If lin.StartsWith("*AccentColorOnTitlebarAndBorders= ") Then ApplyAccentonTitlebars = lin.Remove(0, "*AccentColorOnTitlebarAndBorders= ".Count)
+ If lin.StartsWith("*AccentColorOnStartTaskbarAndActionCenter= ") Then ApplyAccentonTaskbar = lin.Remove(0, "*AccentColorOnStartTaskbarAndActionCenter= ".Count)
+ If lin.StartsWith("*Titlebar_Active= ") Then
+ Titlebar_Active = Color.FromArgb(lin.Remove(0, "*Titlebar_Active= ".Count))
+ Titlebar_DWM_Active = Titlebar_Active
+ End If
+ If lin.StartsWith("*Titlebar_Inactive= ") Then Titlebar_Inactive = Color.FromArgb(lin.Remove(0, "*Titlebar_Inactive= ".Count))
+ If lin.StartsWith("*ActionCenter_AppsLinks= ") Then ActionCenter_AppsLinks = Color.FromArgb(lin.Remove(0, "*ActionCenter_AppsLinks= ".Count))
+ If lin.StartsWith("*Taskbar_Icon_Underline= ") Then Taskbar_Icon_Underline = Color.FromArgb(lin.Remove(0, "*Taskbar_Icon_Underline= ".Count))
+ If lin.StartsWith("*StartButton_Hover= ") Then StartButton_Hover = Color.FromArgb(lin.Remove(0, "*StartButton_Hover= ".Count))
+ If lin.StartsWith("*SettingsIconsAndLinks= ") Then SettingsIconsAndLinks = Color.FromArgb(lin.Remove(0, "*SettingsIconsAndLinks= ".Count))
+ If lin.StartsWith("*StartMenuBackground_ActiveTaskbarButton= ") Then StartMenuBackground_ActiveTaskbarButton = Color.FromArgb(lin.Remove(0, "*StartMenuBackground_ActiveTaskbarButton= ".Count))
+ If lin.StartsWith("*StartListFolders_TaskbarFront= ") Then StartListFolders_TaskbarFront = Color.FromArgb(lin.Remove(0, "*StartListFolders_TaskbarFront= ".Count))
+ If lin.StartsWith("*Taskbar_Background= ") Then Taskbar_Background = Color.FromArgb(lin.Remove(0, "*Taskbar_Background= ".Count))
+ If lin.StartsWith("*StartMenu_Accent= ") Then StartMenu_Accent = Color.FromArgb(lin.Remove(0, "*StartMenu_Accent= ".Count))
End If
- If lin.StartsWith("*Titlebar_Inactive= ") Then Titlebar_Inactive = Color.FromArgb(lin.Remove(0, "*Titlebar_Inactive= ".Count))
- If lin.StartsWith("*ActionCenter_AppsLinks= ") Then ActionCenter_AppsLinks = Color.FromArgb(lin.Remove(0, "*ActionCenter_AppsLinks= ".Count))
- If lin.StartsWith("*Taskbar_Icon_Underline= ") Then Taskbar_Icon_Underline = Color.FromArgb(lin.Remove(0, "*Taskbar_Icon_Underline= ".Count))
- If lin.StartsWith("*StartButton_Hover= ") Then StartButton_Hover = Color.FromArgb(lin.Remove(0, "*StartButton_Hover= ".Count))
- If lin.StartsWith("*SettingsIconsAndLinks= ") Then SettingsIconsAndLinks = Color.FromArgb(lin.Remove(0, "*SettingsIconsAndLinks= ".Count))
- If lin.StartsWith("*StartMenuBackground_ActiveTaskbarButton= ") Then StartMenuBackground_ActiveTaskbarButton = Color.FromArgb(lin.Remove(0, "*StartMenuBackground_ActiveTaskbarButton= ".Count))
- If lin.StartsWith("*StartListFolders_TaskbarFront= ") Then StartListFolders_TaskbarFront = Color.FromArgb(lin.Remove(0, "*StartListFolders_TaskbarFront= ".Count))
- If lin.StartsWith("*Taskbar_Background= ") Then Taskbar_Background = Color.FromArgb(lin.Remove(0, "*Taskbar_Background= ".Count))
- If lin.StartsWith("*StartMenu_Accent= ") Then StartMenu_Accent = Color.FromArgb(lin.Remove(0, "*StartMenu_Accent= ".Count))
#End Region
#Region "LogonUI"
- If lin.StartsWith("*LogonUI_Background= ") Then LogonUI_Background = Color.FromArgb(lin.Remove(0, "*LogonUI_Background= ".Count))
- If lin.StartsWith("*LogonUI_PersonalColors_Background= ") Then LogonUI_PersonalColors_Background = Color.FromArgb(lin.Remove(0, "*LogonUI_PersonalColors_Background= ".Count))
- If lin.StartsWith("*LogonUI_PersonalColors_Accent= ") Then LogonUI_PersonalColors_Accent = Color.FromArgb(lin.Remove(0, "*LogonUI_PersonalColors_Accent= ".Count))
- If lin.StartsWith("*LogonUI_DisableAcrylicBackgroundOnLogon= ") Then LogonUI_DisableAcrylicBackgroundOnLogon = lin.Remove(0, "*LogonUI_DisableAcrylicBackgroundOnLogon= ".Count)
- If lin.StartsWith("*LogonUI_DisableLogonBackgroundImage= ") Then LogonUI_DisableLogonBackgroundImage = lin.Remove(0, "*LogonUI_DisableLogonBackgroundImage= ".Count)
- If lin.StartsWith("*LogonUI_NoLockScreen= ") Then LogonUI_NoLockScreen = lin.Remove(0, "*LogonUI_NoLockScreen= ".Count)
+ If Not My.W7 And Not My.W8 Then
+ If lin.StartsWith("*LogonUI_Background= ") Then LogonUI_Background = Color.FromArgb(lin.Remove(0, "*LogonUI_Background= ".Count))
+ If lin.StartsWith("*LogonUI_PersonalColors_Background= ") Then LogonUI_PersonalColors_Background = Color.FromArgb(lin.Remove(0, "*LogonUI_PersonalColors_Background= ".Count))
+ If lin.StartsWith("*LogonUI_PersonalColors_Accent= ") Then LogonUI_PersonalColors_Accent = Color.FromArgb(lin.Remove(0, "*LogonUI_PersonalColors_Accent= ".Count))
+ If lin.StartsWith("*LogonUI_DisableAcrylicBackgroundOnLogon= ") Then LogonUI_DisableAcrylicBackgroundOnLogon = lin.Remove(0, "*LogonUI_DisableAcrylicBackgroundOnLogon= ".Count)
+ If lin.StartsWith("*LogonUI_DisableLogonBackgroundImage= ") Then LogonUI_DisableLogonBackgroundImage = lin.Remove(0, "*LogonUI_DisableLogonBackgroundImage= ".Count)
+ If lin.StartsWith("*LogonUI_NoLockScreen= ") Then LogonUI_NoLockScreen = lin.Remove(0, "*LogonUI_NoLockScreen= ".Count)
+ End If
#End Region
#Region "Win32UI"
@@ -2254,82 +2266,88 @@ Public Class CP
#Region "Registry"
#Region "Modern Windows"
- EditReg("HKEY_CURRENT_USER\Control Panel\Desktop", "AutoColorization", 0)
-
- Dim Colors As Byte() = {(ActionCenter_AppsLinks).R, (ActionCenter_AppsLinks).G, (ActionCenter_AppsLinks).B, (ActionCenter_AppsLinks).A _
- , (Taskbar_Icon_Underline).R, (Taskbar_Icon_Underline).G, (Taskbar_Icon_Underline).B, (Taskbar_Icon_Underline).A _
- , (StartButton_Hover).R, (StartButton_Hover).G, (StartButton_Hover).B, (StartButton_Hover).A _
- , (SettingsIconsAndLinks).R, (SettingsIconsAndLinks).G, (SettingsIconsAndLinks).B, (SettingsIconsAndLinks).A _
- , (StartMenuBackground_ActiveTaskbarButton).R, (StartMenuBackground_ActiveTaskbarButton).G, (StartMenuBackground_ActiveTaskbarButton).B, (StartMenuBackground_ActiveTaskbarButton).A _
- , (StartListFolders_TaskbarFront).R, (StartListFolders_TaskbarFront).G, (StartListFolders_TaskbarFront).B, (StartListFolders_TaskbarFront).A _
- , (Taskbar_Background).R, (Taskbar_Background).G, (Taskbar_Background).B, (Taskbar_Background).A _
- , 255, 0, 0, 0}
-
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette", Colors, True)
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "StartColorMenu", BizareColorInvertor(StartMenu_Accent).ToArgb)
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentColorMenu", BizareColorInvertor(Titlebar_Active).ToArgb)
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColor", BizareColorInvertor(Titlebar_DWM_Active).ToArgb)
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColorInactive", BizareColorInvertor(Titlebar_Inactive).ToArgb)
-
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "SystemUsesLightTheme", If(WinMode_Light, 1, 0))
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", If(AppMode_Light, 1, 0))
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", If(Transparency, 1, 0))
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", If(ApplyAccentonTaskbar, 1, 0))
- EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", If(ApplyAccentonTitlebars, 1, 0))
+ If Not My.W7 And Not My.W8 Then
+ EditReg("HKEY_CURRENT_USER\Control Panel\Desktop", "AutoColorization", 0)
+
+ Dim Colors As Byte() = {(ActionCenter_AppsLinks).R, (ActionCenter_AppsLinks).G, (ActionCenter_AppsLinks).B, (ActionCenter_AppsLinks).A _
+ , (Taskbar_Icon_Underline).R, (Taskbar_Icon_Underline).G, (Taskbar_Icon_Underline).B, (Taskbar_Icon_Underline).A _
+ , (StartButton_Hover).R, (StartButton_Hover).G, (StartButton_Hover).B, (StartButton_Hover).A _
+ , (SettingsIconsAndLinks).R, (SettingsIconsAndLinks).G, (SettingsIconsAndLinks).B, (SettingsIconsAndLinks).A _
+ , (StartMenuBackground_ActiveTaskbarButton).R, (StartMenuBackground_ActiveTaskbarButton).G, (StartMenuBackground_ActiveTaskbarButton).B, (StartMenuBackground_ActiveTaskbarButton).A _
+ , (StartListFolders_TaskbarFront).R, (StartListFolders_TaskbarFront).G, (StartListFolders_TaskbarFront).B, (StartListFolders_TaskbarFront).A _
+ , (Taskbar_Background).R, (Taskbar_Background).G, (Taskbar_Background).B, (Taskbar_Background).A _
+ , 255, 0, 0, 0}
+
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette", Colors, True)
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "StartColorMenu", BizareColorInvertor(StartMenu_Accent).ToArgb)
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentColorMenu", BizareColorInvertor(Titlebar_Active).ToArgb)
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColor", BizareColorInvertor(Titlebar_DWM_Active).ToArgb)
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "AccentColorInactive", BizareColorInvertor(Titlebar_Inactive).ToArgb)
+
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "SystemUsesLightTheme", If(WinMode_Light, 1, 0))
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", If(AppMode_Light, 1, 0))
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", If(Transparency, 1, 0))
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", If(ApplyAccentonTaskbar, 1, 0))
+ EditReg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", If(ApplyAccentonTitlebars, 1, 0))
+ End If
#End Region
#Region "LogonUI"
- If isElevated Then
- EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Background", String.Format("{0} {1} {2}", LogonUI_Background.R, LogonUI_Background.G, LogonUI_Background.B), False, True)
- EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Background", BizareColorInvertor(LogonUI_PersonalColors_Background).ToArgb)
- EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Accent", BizareColorInvertor(LogonUI_PersonalColors_Accent).ToArgb)
- EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableAcrylicBackgroundOnLogon", If(LogonUI_DisableAcrylicBackgroundOnLogon, 1, 0))
- EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableLogonBackgroundImage", If(LogonUI_DisableLogonBackgroundImage, 1, 0))
- EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "NoLockScreen", If(LogonUI_NoLockScreen, 1, 0))
-
- Else
- Dim ls As New List(Of String)
- ls.Clear()
- ls.Add("Windows Registry Editor Version 5.00")
- ls.Add(vbCrLf)
- ls.Add("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]")
- ls.Add(String.Format("""Background""=""{0} {1} {2}""", LogonUI_Background.R, LogonUI_Background.G, LogonUI_Background.B))
- ls.Add(vbCrLf)
- ls.Add("[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization]")
- ls.Add(String.Format("""PersonalColors_Background""=dword:{0}", RGB2HEX_oneline(BizareColorInvertor(LogonUI_PersonalColors_Background))))
- ls.Add(String.Format("""PersonalColors_Accent""=dword:{0}", RGB2HEX_oneline(BizareColorInvertor(LogonUI_PersonalColors_Accent))))
- ls.Add(String.Format("""NoLockScreen""=dword:0000000{0}", If(LogonUI_NoLockScreen, 1, 0)))
- ls.Add(vbCrLf)
- ls.Add("[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]")
- ls.Add(String.Format("""DisableAcrylicBackgroundOnLogon""=dword:0000000{0}", If(LogonUI_DisableAcrylicBackgroundOnLogon, 1, 0)))
- ls.Add(String.Format("""DisableLogonBackgroundImage""=dword:0000000{0}", If(LogonUI_DisableLogonBackgroundImage, 1, 0)))
-
- Dim result As String = CStr_FromList(ls)
-
- If Not IO.Directory.Exists(My.Application.appData) Then IO.Directory.CreateDirectory(My.Application.appData)
-
- Dim tempreg As String = My.Application.appData & "\tempreg.reg"
-
- IO.File.WriteAllText(tempreg, result)
-
- Dim process As Process = Nothing
-
- Dim processStartInfo As New ProcessStartInfo With {
- .FileName = "regedit",
- .Verb = "runas",
- .Arguments = String.Format("/s ""{0}""", tempreg),
- .WindowStyle = ProcessWindowStyle.Hidden,
- .CreateNoWindow = True,
- .UseShellExecute = True
- }
- process = Process.Start(processStartInfo)
- process.WaitForExit()
- processStartInfo.FileName = "reg"
- processStartInfo.Arguments = String.Format("import ""{0}""", tempreg)
- process = Process.Start(processStartInfo)
- process.WaitForExit()
- Kill(tempreg)
+ If Not My.W7 And Not My.W8 Then
+ If isElevated Then
+ EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Background", String.Format("{0} {1} {2}", LogonUI_Background.R, LogonUI_Background.G, LogonUI_Background.B), False, True)
+ EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Background", BizareColorInvertor(LogonUI_PersonalColors_Background).ToArgb)
+ EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "PersonalColors_Accent", BizareColorInvertor(LogonUI_PersonalColors_Accent).ToArgb)
+ EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableAcrylicBackgroundOnLogon", If(LogonUI_DisableAcrylicBackgroundOnLogon, 1, 0))
+ EditReg("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "DisableLogonBackgroundImage", If(LogonUI_DisableLogonBackgroundImage, 1, 0))
+ EditReg("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization", "NoLockScreen", If(LogonUI_NoLockScreen, 1, 0))
+
+ Else
+ Dim ls As New List(Of String)
+ ls.Clear()
+ ls.Add("Windows Registry Editor Version 5.00")
+ ls.Add(vbCrLf)
+ ls.Add("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]")
+ ls.Add(String.Format("""Background""=""{0} {1} {2}""", LogonUI_Background.R, LogonUI_Background.G, LogonUI_Background.B))
+ ls.Add(vbCrLf)
+ ls.Add("[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization]")
+ ls.Add(String.Format("""PersonalColors_Background""=dword:{0}", RGB2HEX_oneline(BizareColorInvertor(LogonUI_PersonalColors_Background))))
+ ls.Add(String.Format("""PersonalColors_Accent""=dword:{0}", RGB2HEX_oneline(BizareColorInvertor(LogonUI_PersonalColors_Accent))))
+ ls.Add(String.Format("""NoLockScreen""=dword:0000000{0}", If(LogonUI_NoLockScreen, 1, 0)))
+ ls.Add(vbCrLf)
+ ls.Add("[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]")
+ ls.Add(String.Format("""DisableAcrylicBackgroundOnLogon""=dword:0000000{0}", If(LogonUI_DisableAcrylicBackgroundOnLogon, 1, 0)))
+ ls.Add(String.Format("""DisableLogonBackgroundImage""=dword:0000000{0}", If(LogonUI_DisableLogonBackgroundImage, 1, 0)))
+
+ Dim result As String = CStr_FromList(ls)
+
+ If Not IO.Directory.Exists(My.Application.appData) Then IO.Directory.CreateDirectory(My.Application.appData)
+
+ Dim tempreg As String = My.Application.appData & "\tempreg.reg"
+
+ IO.File.WriteAllText(tempreg, result)
+
+ Dim process As Process = Nothing
+
+ Dim processStartInfo As New ProcessStartInfo With {
+ .FileName = "regedit",
+ .Verb = "runas",
+ .Arguments = String.Format("/s ""{0}""", tempreg),
+ .WindowStyle = ProcessWindowStyle.Hidden,
+ .CreateNoWindow = True,
+ .UseShellExecute = True
+ }
+ process = Process.Start(processStartInfo)
+ process.WaitForExit()
+ processStartInfo.FileName = "reg"
+ processStartInfo.Arguments = String.Format("import ""{0}""", tempreg)
+ process = Process.Start(processStartInfo)
+ process.WaitForExit()
+ Kill(tempreg)
+ End If
End If
+
+
#End Region
#Region "Win32UI"
@@ -2798,39 +2816,45 @@ Public Class CP
tx.Add("" & vbCrLf)
#End Region
+
#Region "Modern Windows"
- tx.Add("")
- tx.Add("*WinMode_Light= " & WinMode_Light)
- tx.Add("*AppMode_Light= " & AppMode_Light)
- tx.Add("*Transparency= " & Transparency)
- tx.Add("*AccentColorOnTitlebarAndBorders= " & ApplyAccentonTitlebars)
- tx.Add("*AccentColorOnStartTaskbarAndActionCenter= " & ApplyAccentonTaskbar)
- tx.Add("" & vbCrLf)
-
- tx.Add("")
- tx.Add("*Titlebar_Active= " & Titlebar_Active.ToArgb)
- tx.Add("*Titlebar_Inactive= " & Titlebar_Inactive.ToArgb)
- tx.Add("*ActionCenter_AppsLinks= " & ActionCenter_AppsLinks.ToArgb)
- tx.Add("*Taskbar_Icon_Underline= " & Taskbar_Icon_Underline.ToArgb)
- tx.Add("*StartButton_Hover= " & StartButton_Hover.ToArgb)
- tx.Add("*SettingsIconsAndLinks= " & SettingsIconsAndLinks.ToArgb)
- tx.Add("*StartMenuBackground_ActiveTaskbarButton= " & StartMenuBackground_ActiveTaskbarButton.ToArgb)
- tx.Add("*StartListFolders_TaskbarFront= " & StartListFolders_TaskbarFront.ToArgb)
- tx.Add("*Taskbar_Background= " & Taskbar_Background.ToArgb)
- tx.Add("*StartMenu_Accent= " & StartMenu_Accent.ToArgb)
- tx.Add("*Undefined= " & Color.FromArgb(255, 0, 0, 0).ToArgb)
- tx.Add("" & vbCrLf)
+ If Not My.W7 And Not My.W8 Then
+ tx.Add("")
+ tx.Add("*WinMode_Light= " & WinMode_Light)
+ tx.Add("*AppMode_Light= " & AppMode_Light)
+ tx.Add("*Transparency= " & Transparency)
+ tx.Add("*AccentColorOnTitlebarAndBorders= " & ApplyAccentonTitlebars)
+ tx.Add("*AccentColorOnStartTaskbarAndActionCenter= " & ApplyAccentonTaskbar)
+ tx.Add("" & vbCrLf)
+
+ tx.Add("")
+ tx.Add("*Titlebar_Active= " & Titlebar_Active.ToArgb)
+ tx.Add("*Titlebar_Inactive= " & Titlebar_Inactive.ToArgb)
+ tx.Add("*ActionCenter_AppsLinks= " & ActionCenter_AppsLinks.ToArgb)
+ tx.Add("*Taskbar_Icon_Underline= " & Taskbar_Icon_Underline.ToArgb)
+ tx.Add("*StartButton_Hover= " & StartButton_Hover.ToArgb)
+ tx.Add("*SettingsIconsAndLinks= " & SettingsIconsAndLinks.ToArgb)
+ tx.Add("*StartMenuBackground_ActiveTaskbarButton= " & StartMenuBackground_ActiveTaskbarButton.ToArgb)
+ tx.Add("*StartListFolders_TaskbarFront= " & StartListFolders_TaskbarFront.ToArgb)
+ tx.Add("*Taskbar_Background= " & Taskbar_Background.ToArgb)
+ tx.Add("*StartMenu_Accent= " & StartMenu_Accent.ToArgb)
+ tx.Add("*Undefined= " & Color.FromArgb(255, 0, 0, 0).ToArgb)
+ tx.Add("" & vbCrLf)
+ End If
+
#End Region
#Region "LogonUI"
- tx.Add("")
- tx.Add("*LogonUI_Background= " & LogonUI_Background.ToArgb)
- tx.Add("*LogonUI_PersonalColors_Background= " & LogonUI_PersonalColors_Background.ToArgb)
- tx.Add("*LogonUI_PersonalColors_Accent= " & LogonUI_PersonalColors_Accent.ToArgb)
- tx.Add("*LogonUI_DisableAcrylicBackgroundOnLogon= " & LogonUI_DisableAcrylicBackgroundOnLogon)
- tx.Add("*LogonUI_DisableLogonBackgroundImage= " & LogonUI_DisableLogonBackgroundImage)
- tx.Add("*LogonUI_NoLockScreen= " & LogonUI_NoLockScreen)
- tx.Add("" & vbCrLf)
+ If Not My.W7 And Not My.W8 Then
+ tx.Add("")
+ tx.Add("*LogonUI_Background= " & LogonUI_Background.ToArgb)
+ tx.Add("*LogonUI_PersonalColors_Background= " & LogonUI_PersonalColors_Background.ToArgb)
+ tx.Add("*LogonUI_PersonalColors_Accent= " & LogonUI_PersonalColors_Accent.ToArgb)
+ tx.Add("*LogonUI_DisableAcrylicBackgroundOnLogon= " & LogonUI_DisableAcrylicBackgroundOnLogon)
+ tx.Add("*LogonUI_DisableLogonBackgroundImage= " & LogonUI_DisableLogonBackgroundImage)
+ tx.Add("*LogonUI_NoLockScreen= " & LogonUI_NoLockScreen)
+ tx.Add("" & vbCrLf)
+ End If
#End Region
#Region "Win32UI"
diff --git a/WinPaletter/Classes/XenonCore.vb b/WinPaletter/Classes/XenonCore.vb
index d1aa17bf..38094d73 100644
--- a/WinPaletter/Classes/XenonCore.vb
+++ b/WinPaletter/Classes/XenonCore.vb
@@ -326,8 +326,6 @@ Public Class XenonCore
MainFrm.status_lbl.ForeColor = If(DarkMode, Color.White, Color.Black)
End Sub
-
-
Public Shared Sub EnumControls(ByVal ctrl As Control, ByVal DarkMode As Boolean)
Dim b As Boolean = False
diff --git a/WinPaletter/GUI/XenonUI.vb b/WinPaletter/GUI/XenonUI.vb
index a10aee06..72be3dba 100644
--- a/WinPaletter/GUI/XenonUI.vb
+++ b/WinPaletter/GUI/XenonUI.vb
@@ -91,9 +91,9 @@ Module XenonModule
If System.ComponentModel.LicenseManager.UsageMode = System.ComponentModel.LicenseUsageMode.Designtime Then
Return False
Else
- If My.WindowsVersions.W11 Then
+ If My.WindowsVersions.W11 Or My.WindowsVersions.W7 Then
Return True
- ElseIf My.WindowsVersions.W10 Then
+ ElseIf My.WindowsVersions.W10 Or My.WindowsVersions.W8 Then
Return False
Else
Return False
diff --git a/WinPaletter/Win32UI.vb b/WinPaletter/Win32UI.vb
index 79e5ce0d..f36c3329 100644
--- a/WinPaletter/Win32UI.vb
+++ b/WinPaletter/Win32UI.vb
@@ -546,23 +546,23 @@ Public Class Win32UI
CList_FromStr(s, IO.File.ReadAllText(File))
For Each x As String In s
- If x.ToLower.StartsWith("activetitle=") Then
+ If x.ToLower.StartsWith("activetitle=".ToLower) Then
activetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
If Not FoundGradientActive Then GActivetitle_pick.BackColor = activetitle_pick.BackColor
End If
- If x.ToLower.StartsWith("gradientactivetitle=") Then
+ If x.ToLower.StartsWith("gradientactivetitle=".ToLower) Then
GActivetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
FoundGradientActive = True
End If
- If x.ToLower.StartsWith("inactivetitle=") Then
+ If x.ToLower.StartsWith("inactivetitle=".ToLower) Then
InactiveTitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
If Not FoundGradientInactive Then GInactivetitle_pick.BackColor = InactiveTitle_pick.BackColor
End If
- If x.ToLower.StartsWith("gradientinactivetitle=") Then
+ If x.ToLower.StartsWith("gradientinactivetitle=".ToLower) Then
GInactivetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
FoundGradientInactive = True
End If
@@ -640,23 +640,23 @@ Public Class Win32UI
For Each x As String In SelectedThemeList
- If x.ToLower.StartsWith("activetitle=") Then
+ If x.ToLower.StartsWith("activetitle=".ToLower) Then
activetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
If Not FoundGradientActive Then GActivetitle_pick.BackColor = activetitle_pick.BackColor
End If
- If x.ToLower.StartsWith("gradientactivetitle=") Then
+ If x.ToLower.StartsWith("gradientactivetitle=".ToLower) Then
GActivetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
FoundGradientActive = True
End If
- If x.ToLower.StartsWith("inactivetitle=") Then
+ If x.ToLower.StartsWith("inactivetitle=".ToLower) Then
InactiveTitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
If Not FoundGradientInactive Then GInactivetitle_pick.BackColor = InactiveTitle_pick.BackColor
End If
- If x.ToLower.StartsWith("gradientinactivetitle=") Then
+ If x.ToLower.StartsWith("gradientinactivetitle=".ToLower) Then
GInactivetitle_pick.BackColor = Color.FromArgb(x.Split("=")(1).Split(" ")(0), x.Split("=")(1).Split(" ")(1), x.Split("=")(1).Split(" ")(2))
FoundGradientInactive = True
End If
diff --git a/WinPaletter/WinPaletter.vbproj b/WinPaletter/WinPaletter.vbproj
index 7bf18c57..f3b3577b 100644
--- a/WinPaletter/WinPaletter.vbproj
+++ b/WinPaletter/WinPaletter.vbproj
@@ -87,6 +87,7 @@
..\References\Cyotek.Windows.Forms.ColorPicker.dll
False
+ False