Example #1
0
        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            _closeTimer.Tick -= _closeTimer_Tick;

            NotifyControl.OnClosing();

            Application.RemoveMessageFilter(_messageFilter);
        }
Example #2
0
        public NotifyForm(NotifyControl notifyControl)
        {
            _messageFilter = new MouseMessageFilter(this);

            NotifyControl = notifyControl;

            InitializeComponent();

            notifyControl.Dock = DockStyle.Fill;
            Controls.Add(notifyControl);

            _closeTimer.Tick += _closeTimer_Tick;
        }
Example #3
0
        internal void ShowGracefully()
        {
            lock (_lockObj)
            {
                Opacity = 0;
                ShowWindow(Handle, SW_SHOWNOACTIVATE);

                _showTimer.Interval = 30;
                _showTimer.Tick    += new EventHandler(_showTimer_Tick);
                _showTimer.Start();

                Application.AddMessageFilter(_messageFilter);
                NotifyControl.OnShow();

                _loaded = true;

                if (_closeOnShow)
                {
                    CloseInternal();
                }
            }
        }