Ejemplo n.º 1
0
        public bool WindowIsMine(Win32Window window)
        {
            if (MultiMonitorManager.IsTaskbarWindow(window.Handle))
            {
                return(true);
            }
            if (window.Handle == tooltipManager.ToolTipWindow.Handle)
            {
                return(true);
            }

            // I haven't found a way to show this "close form" and make it TopMost without sending the WM_ACTIVATE message, so we need to ignore this message
            if (tooltipManager.ToolTipWindow.CloseForm != null && window.Handle == tooltipManager.ToolTipWindow.CloseForm.Handle)
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        protected override void WndProc(ref Message m)
        {
            // Notification from hook dll - need to update icons
            if (m.Msg == (int)Native.WindowMessage.WM_APP + 1516)
            {
                MultiMonitorManager.UpdateNotificationIcons(m);
            }
            // Taskbar button progress
            else if (m.Msg == (int)Native.WindowMessage.WM_APP + 1601 ||
                     m.Msg == (int)Native.WindowMessage.WM_APP + 1602 ||
                     m.Msg == (int)Native.WindowMessage.WM_APP + 1603)
            {
                MultiMonitorManager.UpdateTaskbarButton(m);
            }
            else if (m.Msg == WM_ShellHook)
            {
                MultiMonitorManager.OnShellHook(m);
            }

            base.WndProc(ref m);
        }