加上设置窗口到最前的辅助方法

This commit is contained in:
lindexi committed 2020-08-13 22:49:32 +08:00
1 parent 35eb871040
commit 7151fec7b8
2 files changed
+46

No files matched your search

@@ -43,6 +43,13 @@ namespace HandyControl.Tools.Interop
[DllImport(InteropValues.ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto)]
internal static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
[DllImport(InteropValues.ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto)]
internal static extern bool AttachThreadInput(in uint currentForegroundWindowThreadId,
in uint thisWindowThreadId, bool isAttach);
[DllImport(InteropValues.ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto)]
internal static extern IntPtr GetForegroundWindow();
[DllImport(InteropValues.ExternDll.Kernel32, SetLastError = true, CharSet = CharSet.Auto)]
internal static extern IntPtr OpenProcess(InteropValues.ProcessAccess dwDesiredAccess,
[MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwProcessId);