示例#1
0
        /// <summary>
        /// Get the collection of WindowSnap instances fro all available windows
        /// </summary>
        /// <param name="minimized">Capture a window even it's Minimized</param>
        /// <param name="specialCapturring">use special capturing method to capture minmized windows</param>
        /// <returns>return collections of WindowSnap instances</returns>
        public static WindowSnapCollection GetAllWindows(bool minimized, bool specialCapturring)
        {
            windowSnaps           = new WindowSnapCollection();
            countMinimizedWindows = minimized;         //set minimized flag capture
            useSpecialCapturing   = specialCapturring; //set specialcapturing flag

            Win32Ext.EnumWindowsCallbackHandler callback = new Win32Ext.EnumWindowsCallbackHandler(EnumWindowsCallback);
            Win32Ext.EnumWindows(callback, IntPtr.Zero);

            return(new WindowSnapCollection(windowSnaps.ToArray(), true));
        }
        public WindowSnapCollection GetAllMinimized()
        {
            WindowSnapCollection wsCol = (WindowSnapCollection)base.FindAll(IsMinimizedPredict);

            return(wsCol);
        }