This commit is contained in:
PrefacedCorg
2026-04-26 16:38:54 +08:00
parent adebf8ec38
commit 9132c9eb14
5 changed files with 336 additions and 231 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
@@ -54,6 +54,11 @@ namespace Ink_Canvas.Helpers
[DllImport("user32.dll")]
private static extern IntPtr MonitorFromRect(ref RECT lprc, uint dwFlags);
public static IntPtr GetForegroundWindowHandle()
{
return GetForegroundWindow();
}
public static string WindowTitle()
{
IntPtr foregroundWindowHandle = GetForegroundWindow();