public Object _findWindowsRegExp(INakoFuncCallInfo info) { string pattern = info.StackPopAsString(); IntPtr hWnd = EnumWindows.FindWindowRE(pattern); int h = hWnd.ToInt32(); return(h); }
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); } }