:fire:增加自定义背景保存

This commit is contained in:
BookerLiu
2025-03-07 10:59:39 +08:00
parent e74b6d75c4
commit 32e91d6d23
24 changed files with 461 additions and 47 deletions

View File

@@ -126,17 +126,17 @@ namespace ShowSeconds
private void SecondsHookSetFuc(object sender, MouseEventExtArgs e)
{
IntPtr taskBarWnd = WindowUtil.FindWindow("Shell_TrayWnd", null);
IntPtr tray = WindowUtil.FindWindowEx(taskBarWnd, IntPtr.Zero, "TrayNotifyWnd", null);
//IntPtr trayclock = WindowUtil.FindWindowEx(tray, IntPtr.Zero, "TrayClockWClass", null);
IntPtr trayclock = WindowUtil.GetForegroundWindow();
StringBuilder title = new StringBuilder(256);
WindowUtil.GetWindowText(trayclock, title, title.Capacity);//得到窗口的标题
Console.WriteLine(title.ToString());
if (title.Equals("通知中心"))
{
//IntPtr taskBarWnd = WindowUtil.FindWindow("Shell_TrayWnd", null);
//IntPtr tray = WindowUtil.FindWindowEx(taskBarWnd, IntPtr.Zero, "TrayNotifyWnd", null);
////IntPtr trayclock = WindowUtil.FindWindowEx(tray, IntPtr.Zero, "TrayClockWClass", null);
//IntPtr trayclock = WindowUtil.GetForegroundWindow();
//StringBuilder title = new StringBuilder(256);
//WindowUtil.GetWindowText(trayclock, title, title.Capacity);//得到窗口的标题
////Console.WriteLine(title.ToString());
//if (title.Equals("通知中心"))
//{
}
//}
if (e.Button == System.Windows.Forms.MouseButtons.Left)