Stuff for tunesync

This commit is contained in:
Dan Clark
2024-11-16 19:46:25 +00:00
parent 0865e7da89
commit b5bf17821c
27 changed files with 562 additions and 58 deletions
+4
View File
@@ -7,6 +7,10 @@ namespace Toolkit.Windows;
public class WindowHelper
{
public static IntPtr GetHandle(string windowName) => PInvoke.FindWindow(windowName, null);
public static uint GetDpi(IntPtr handle) => PInvoke.GetDpiForWindow((HWND)handle);
public static void BringToForeground(HWND handle)
{
if (TryGetBoundsUnsafe(handle, out RECT bounds))