예제 #1
0
        public IntPtr Get_Window()
        {
            uint threadId = Win32.User32.GetWindowThreadProcessId(IntPtr.Zero, out int processId);

            Win32.GUITHREADINFO gui = new Win32.GUITHREADINFO();
            if (Win32.User32.GetGUIThreadInfo(threadId, gui))
            {
                return(gui.hwndActive);
            }

            //return Platform.Win32.User32.GetActiveWindow();
            return(IntPtr.Zero);
        }
예제 #2
0
파일: User32.cs 프로젝트: dsisco11/CssUI
 public static extern bool GetGUIThreadInfo(UInt32 threadId, [In, Out] GUITHREADINFO pgui);