Files
NotificationFlyout/NotificationFlyout.Wpf.UI/Helpers/WindowHelper.cs
T
Daniel Clark 45a9eb9cd2 init
2021-02-05 01:39:51 +00:00

19 lines
400 B
C#

using Microsoft.Windows.Sdk;
using System;
namespace NotificationFlyout.Wpf.UI.Helpers
{
public class WindowHelper
{
public static IntPtr GetHandle(string windowName)
{
return PInvoke.FindWindow(windowName, null);
}
public static uint GetDpi(IntPtr handle)
{
return PInvoke.GetDpiForWindow((HWND)handle);
}
}
}