protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); _closeTimer.Tick -= _closeTimer_Tick; NotifyControl.OnClosing(); Application.RemoveMessageFilter(_messageFilter); }
public NotifyForm(NotifyControl notifyControl) { _messageFilter = new MouseMessageFilter(this); NotifyControl = notifyControl; InitializeComponent(); notifyControl.Dock = DockStyle.Fill; Controls.Add(notifyControl); _closeTimer.Tick += _closeTimer_Tick; }
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(); } } }