Пример #1
0
        public Object _findWindowsRegExp(INakoFuncCallInfo info)
        {
            string pattern = info.StackPopAsString();
            IntPtr hWnd    = EnumWindows.FindWindowRE(pattern);
            int    h       = hWnd.ToInt32();

            return(h);
        }
Пример #2
0
        public static void ActivateWindow(string title)
        {
            IntPtr h = IntPtr.Zero;

            h = FindWindow(null, title);
            if (h == (IntPtr)null)
            {
                h = EnumWindows.FindWindowRE(title);
            }
            if (h != IntPtr.Zero)
            {
                SetForegroundWindow(h);
            }
        }