private static IntPtr GetVirtualBoxInForeground(IntPtr foregroundWindow, string foregroundWindowTitle)
        {
            var mainWindow = IntPtr.Zero;

            if (GetWindowClass(foregroundWindow) == "QWidget" &&
                foregroundWindowTitle.EndsWith("VirtualBox"))
            {
                WinApi.EnumChildWindows(foregroundWindow, (hwnd, lParam) =>
                {
                    if (GetWindowString(hwnd) == "qt_scrollarea_vcontainer" &&
                        GetWindowClass(hwnd) == "QWidget")
                    {
                        mainWindow = WinApi.GetParent(hwnd);
                        return(false);
                    }
                    return(true);
                }, IntPtr.Zero);
            }
            return(mainWindow);
        }
 private void FindWindows()
 {
     _wmTaskbarCreated = WinApi.RegisterWindowMessage("TaskbarCreated");
     _taskViewButtons  = new List <IntPtr>();
     WinApi.EnumChildWindows(WinApi.GetDesktopWindow(), EnumWindow, IntPtr.Zero);
 }