diff --git a/demo/Skylark.WinForms.Demo/WinFormsDemoWallpaper/WinFormsDemoWallpaper/WinFormsDemoWallpaper.csproj b/demo/Skylark.WinForms.Demo/WinFormsDemoWallpaper/WinFormsDemoWallpaper/WinFormsDemoWallpaper.csproj index 9cc04b4..e84ec58 100644 --- a/demo/Skylark.WinForms.Demo/WinFormsDemoWallpaper/WinFormsDemoWallpaper/WinFormsDemoWallpaper.csproj +++ b/demo/Skylark.WinForms.Demo/WinFormsDemoWallpaper/WinFormsDemoWallpaper/WinFormsDemoWallpaper.csproj @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/Skylark.Uptime/Skylark.Uptime.cs b/src/Skylark.Uptime/Skylark.Uptime.cs index 47f6654..b4d9c0b 100644 --- a/src/Skylark.Uptime/Skylark.Uptime.cs +++ b/src/Skylark.Uptime/Skylark.Uptime.cs @@ -15,7 +15,7 @@ // Creator: Taiizor // Website: www.vegalya.com // Created: 27.Feb.2023 -// Changed: 02.Nov.2024 +// Changed: 04.Nov.2024 // Version: 3.1.5.4 // // |---------DO-NOT-REMOVE---------| diff --git a/src/Skylark.Wing/Helper/DesktopCore.cs b/src/Skylark.Wing/Helper/DesktopCore.cs index 5bf9ffb..c166b4e 100644 --- a/src/Skylark.Wing/Helper/DesktopCore.cs +++ b/src/Skylark.Wing/Helper/DesktopCore.cs @@ -87,7 +87,17 @@ public static bool FixHandle(IntPtr Handle) if (Progman == IntPtr.Zero) { - return false; + // If Progman is not found, create a new instance. + Process.Start("explorer.exe"); + + Thread.Sleep(1000); + + Progman = SWHWAPI.FindWindow("Progman", "Program Manager"); + + if (Progman == IntPtr.Zero) + { + return false; + } } IntPtr WorkerW = IntPtr.Zero; @@ -153,6 +163,11 @@ private static bool SetParent(IntPtr Handle, IntPtr Progman, IntPtr WorkerW) //To determine if system is running on Windows 7 if (SWEOS.GetOperatingSystem() == SEOST.Windows7) { + if (Progman.Equals(IntPtr.Zero)) + { + Progman = SWHWAPI.FindWindow("Progman", "Program Manager"); + } + if (!WorkerW.Equals(Progman)) { // Hide WorkerW to make it act as the wallpaper background @@ -166,8 +181,6 @@ private static bool SetParent(IntPtr Handle, IntPtr Progman, IntPtr WorkerW) return false; } - WorkerW = Progman; - Return = SWNM.SetParent(Handle, WorkerW); if (Return.Equals(IntPtr.Zero)) diff --git a/src/Skylark.Wing/Skylark.Wing.cs b/src/Skylark.Wing/Skylark.Wing.cs index 663bafb..96f8365 100644 --- a/src/Skylark.Wing/Skylark.Wing.cs +++ b/src/Skylark.Wing/Skylark.Wing.cs @@ -21,8 +21,8 @@ // Creator: Taiizor // Website: www.vegalya.com // Created: 17.Jun.2023 -// Changed: 02.Nov.2024 -// Version: 3.1.7.6 +// Changed: 04.Nov.2024 +// Version: 3.1.7.7 // // |---------DO-NOT-REMOVE---------| diff --git a/src/Skylark.Wing/Skylark.Wing.csproj b/src/Skylark.Wing/Skylark.Wing.csproj index c13d61f..9d0c559 100644 --- a/src/Skylark.Wing/Skylark.Wing.csproj +++ b/src/Skylark.Wing/Skylark.Wing.csproj @@ -12,7 +12,7 @@ Resources\Skylark.Wing.ico - 3.1.7.6 + 3.1.7.7 $(Version) true Skylark.Wing diff --git a/src/Skylark/Skylark.cs b/src/Skylark/Skylark.cs index 9bde592..e3c5722 100644 --- a/src/Skylark/Skylark.cs +++ b/src/Skylark/Skylark.cs @@ -12,7 +12,7 @@ // Creator: Taiizor // Website: www.vegalya.com // Created: 03.Jan.2023 -// Changed: 02.Nov.2024 +// Changed: 04.Nov.2024 // Version: 3.1.4.9 // // |---------DO-NOT-REMOVE---------|