Ejemplo n.º 1
0
        private void notifyTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
//			notifyForm = new NotifyForm(this.notifyIcon.Text);
//			notifyForm.ShowNoActivate();
//			notifyForm.Closed += new EventHandler(notifyForm_Closed);
            notifyForm = new NotifyForm(this.notifyIcon.Text);

            int       screenWidth  = Screen.PrimaryScreen.WorkingArea.Width;
            int       screenHeight = Screen.PrimaryScreen.WorkingArea.Height;
            int       clientWidth  = notifyForm.Width;
            int       clientHeight = notifyForm.Height;
            Rectangle area         = new Rectangle(screenWidth - clientWidth, screenHeight - clientHeight,
                                                   clientWidth, clientHeight);

            popup      = new Popup(this.notifyForm);
            popup.Top  = screenHeight - clientHeight;
            popup.Left = screenWidth - clientWidth;

            popup.Closed += new ToolStripDropDownClosedEventHandler(notifyPopup_Closed);
            notifyForm.Prepare();
            popup.Show(new Point(screenWidth - clientWidth, screenHeight - clientHeight));
        }