示例#1
0
        /// <summary>
        /// On Win10+, if w is "ApplicationFrameWindow", returns the real app window "Windows.UI.Core.CoreWindow" hosted by w.
        /// If w is minimized, cloaked (eg on other desktop) or the app is starting, the "Windows.UI.Core.CoreWindow" is not its child. Then searches for a top-level window named like w. It is unreliable, but MS does not provide API for this.
        /// Info: "Windows.UI.Core.CoreWindow" windows hosted by "ApplicationFrameWindow" belong to separate processes. All "ApplicationFrameWindow" windows belong to a single process.
        /// </summary>
        static wnd _WindowsStoreAppFrameChild(wnd w)
        {
            bool   retry = false;
            string name;

g1:
            if (!osVersion.minWin10 || !w.ClassNameIs("ApplicationFrameWindow"))
            {
                return(default);
示例#2
0
 /// <summary>
 /// Returns true if window class name starts with "WindowsForms".
 /// Usually it means that we can get Windows Forms control name of w and its child controls.
 /// </summary>
 /// <param name="w">The window. Can be top-level or control.</param>
 public static bool IsWinformsControl(wnd w)
 {
     return(w.ClassNameIs("WindowsForms*"));
 }