SidebarDiagnostics.Windows.AppBarWindow.DisableAeroPeek C# (CSharp) Method

DisableAeroPeek() public method

public DisableAeroPeek ( ) : void
return void
        public void DisableAeroPeek()
        {
            IntPtr _hwnd = new WindowInteropHelper(this).Handle;

            IntPtr _status = Marshal.AllocHGlobal(sizeof(int));
            Marshal.WriteInt32(_status, 1);

            NativeMethods.DwmSetWindowAttribute(_hwnd, DWMWINDOWATTRIBUTE.DWMWA_EXCLUDED_FROM_PEEK, _status, sizeof(int));
        }