diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 26d147d6..90ef2bec 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/Bin/net45/SunnyUI.dll b/Bin/net45/SunnyUI.dll index 4160f4c3..451ecc61 100644 Binary files a/Bin/net45/SunnyUI.dll and b/Bin/net45/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll index e647e998..20cc265e 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll index fd6cb39d..b3b19804 100644 Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index b33d2620..7644504c 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI/Controls/UIImageListBox.cs b/SunnyUI/Controls/UIImageListBox.cs index 85af59b3..e6eada6a 100644 --- a/SunnyUI/Controls/UIImageListBox.cs +++ b/SunnyUI/Controls/UIImageListBox.cs @@ -362,6 +362,21 @@ namespace Sunny.UI } } + protected override void WndProc(ref Message m) + { + if (IsDisposed || Disposing) return; + if (IsHandleCreated) + { + if (m.Msg == Win32.User.WM_ERASEBKGND) + { + m.Result = IntPtr.Zero; + return; + } + } + + base.WndProc(ref m); + } + public ImageListBox() { SetStyle(ControlStyles.AllPaintingInWmPaint, true); diff --git a/SunnyUI/Controls/UIListBox.cs b/SunnyUI/Controls/UIListBox.cs index 8ca83587..dba1c6d1 100644 --- a/SunnyUI/Controls/UIListBox.cs +++ b/SunnyUI/Controls/UIListBox.cs @@ -523,6 +523,12 @@ namespace Sunny.UI { ItemsInsert?.Invoke(this, EventArgs.Empty); } + + if (m.Msg == Win32.User.WM_ERASEBKGND) + { + m.Result = IntPtr.Zero; + return; + } } base.WndProc(ref m);