示例#1
0
        public static void makeTransparent(IntPtr hwnd)
        {
            int extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE);

            ClickThrough.SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle |
                                       WS_EX_TRANSPARENT);
        }
示例#2
0
        //Code for click through window found here.
        //https://stackoverflow.com/questions/2842667/how-to-create-a-semi-transparent-window-in-wpf-that-allows-mouse-events-to-pass?rq=1

        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);
            IntPtr hwnd = new System.Windows.Interop.WindowInteropHelper(this).Handle;

            ClickThrough.makeTransparent(hwnd);
        }