Пример #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _windowList = new List<IntPtr>();
            _windowNames = new List<string>();

            //SetStyle(ControlStyles.UserPaint, true);
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);

            // Set up the glass effect using padding as the defining glass region
            if (Win32.DwmIsCompositionEnabled())
            {
                _glassMargins = new Margins();
                _glassMargins.Top = -1;
                _glassMargins.Left = -1;
                _glassMargins.Bottom = -1;
                _glassMargins.Right = -1;
                Win32.DwmExtendFrameIntoClientArea(this.Handle, ref _glassMargins);
            }

            Win32.EnumWindowsProc enumWindowsDelegate = new Win32.EnumWindowsProc(EnumWindows);
            Win32.EnumWindows(enumWindowsDelegate, new IntPtr());
            windowList.DataSource = _windowNames;
        }
Пример #2
0
 public static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref Margins margins);
Пример #3
0
 public static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref Margins margins);