// Change the taskbar
        private bool UpdateTaskbar(AccentPolicy accent)
        {
            // Get size of struct
            var accentStructSize = Marshal.SizeOf(accent);
            var accentPtr = Marshal.AllocHGlobal(accentStructSize);
            Marshal.StructureToPtr(accent, accentPtr, false);

            // Construct data parameter
            var data = new WindowCompositionAttributeData();
            data.Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY;
            data.SizeOfData = accentStructSize;
            data.Data = accentPtr;

            // Get all processes 
            Process[] explorerProcesses = Process.GetProcessesByName("explorer");

            // Taskbar will be the first process
            IntPtr hWnd = explorerProcesses[0].MainWindowHandle;

            // Check if function executes
            if (SetWindowCompositionAttribute(hWnd, ref data))
            {
                // Free memory associated with accentPtr
                Marshal.FreeHGlobal(accentPtr);
                return true;
            }
            else
            {
                return false;
            }
        }
        // Taskbar gradient
        public bool SetTaskBarDisabled()
        {
            // Set the accent
            var accent = new AccentPolicy();
            accent.AccentState = AccentState.ACCENT_DISABLED;

            // Update Taskbar
            if (UpdateTaskbar(accent))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        // Taskbar gradient
        public bool SetTaskBarTransparentGradient()
        {
            // Set the accent
            var accent = new AccentPolicy();
            accent.AccentState = AccentState.ACCENT_ENABLE_TRANSPARENTGRADIENT;

            // Update Taskbar
            if (UpdateTaskbar(accent))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        // Taskbar gradient
        public bool SetTaskBarBlur()
        {
            // Set the accent
            var accent = new AccentPolicy();
            accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;

            // Update Taskbar
            if (UpdateTaskbar(accent))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        // Taskbar invalid or transparent
        public bool SetTaskbarInvalid()
        {
            // Set the accent
            var accent = new AccentPolicy();
            accent.AccentState = AccentState.ACCENT_INVALID_STATE;

            if (UpdateTaskbar(accent))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        ///////////////////////////////////////////////////////
        ////                  METHODS                     /////
        ///////////////////////////////////////////////////////

        // Update current parameters
        public void UpdateParameters()
        {
            // Variable for our new accent policy
            var newAccentPolicy = new AccentPolicy();

            
            // Get size of struct
            var accentStructSize = 1024;
            var accentPtr = Marshal.AllocHGlobal(accentStructSize);
            Marshal.StructureToPtr(newAccentPolicy, accentPtr, false);

            // Construct data parameter
            var data = new WindowCompositionAttributeData();
            data.Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY;
            data.SizeOfData = accentStructSize;
            data.Data = accentPtr;
            Console.WriteLine("Before: {0} {1} {2}", data.Data, data.SizeOfData, data.Attribute);

            // Get all processes 
            Process[] explorerProcesses = Process.GetProcessesByName("explorer");

            Console.WriteLine("Logic: {0} {1}", explorerProcesses[0].ProcessName, explorerProcesses[0].Id);
            IntPtr hWnd = explorerProcesses[0].MainWindowHandle;

            try {
                // Check if function executes
                GetWindowCompositionAttribute(hWnd, ref data);

                Console.WriteLine("After: {0} {1} {2}", data.Data, data.SizeOfData, data.Attribute);

            } catch (Exception e) {
                Console.WriteLine("Error occurred: {0}", e);
            } finally
            {
                // Free memory associated with accentPtr
                //Marshal.FreeHGlobal(accentPtr);
            }


        }