Example #1
0
 private void frmAutoShut_Resize(object sender, EventArgs e) //minimize to tray
 {
     if (FormWindowState.Minimized == this.WindowState)
     {
         this.Hide();
         NotifyIcon1.ShowBalloonTip(200);
     }
 }
Example #2
0
        private void hiệnGhiChúToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
            GeneralNoteForm NoteForm = new GeneralNoteForm();

            NoteForm.Dtpk.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
            NoteForm.ShowDialog();
        }
Example #3
0
 private void CalendarProject_Load(object sender, EventArgs e)
 {
     Count();
     NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
     dtpk.Value       = DateTime.Now;
     ClockLB.Text     = DateTime.Now.ToString("T");
     ClockLB.Location = new Point(PanelIcon.Size.Width / 2 - ClockLB.Size.Width / 2, 12);
     timer1.Start();
 }
Example #4
0
        private void MainButton_Click(object sender, MouseEventArgs e)
        {
            m_IsLock             = !m_IsLock;
            MainButton.Text      = m_IsLock ? UnLockString : LockString;
            MainButton.BackColor = m_IsLock ? GreenColor : RedColor;

            NotifyIcon1.ShowBalloonTip(0, this.Text,
                                       string.Format(StateMsgString, m_IsLock ? LockString : UnLockString),
                                       ToolTipIcon.Info);

            System.GC.Collect();
        }
Example #5
0
 private void Form1_Resize(object sender, EventArgs e)
 {
     if (this.WindowState == FormWindowState.Minimized)
     {
         this.Hide();
         NotifyIcon1.Visible = true;
         NotifyIcon1.ShowBalloonTip(1000);
     }
     else if (FormWindowState.Normal == this.WindowState)
     {
         NotifyIcon1.Visible = false;
     }
 }
Example #6
0
        private void Form1_SizeChanged(object sender, EventArgs e)
        {
            bool mousePointerOffTaskbar = Screen.GetWorkingArea(this).Contains(Cursor.Position);

            if (this.WindowState == FormWindowState.Minimized)
            {
                NotifyIcon1.Icon           = SystemIcons.Application;
                NotifyIcon1.Visible        = true;
                NotifyIcon1.BalloonTipText = "The program is minimized to system tray";
                NotifyIcon1.ShowBalloonTip(1000);
                this.ShowInTaskbar = false;
            }
        }
Example #7
0
 private void Form1_SizeChanged(object sender, EventArgs e)
 {
     if (this.WindowState == FormWindowState.Minimized)
     {
         this.Hide();
         this.ShowInTaskbar = false;
         this.WindowState   = FormWindowState.Minimized;
         NotifyIcon1.Tag    = string.Empty;
         NotifyIcon1.ShowBalloonTip(3000, this.Text,
                                    BackgroundMsgString,
                                    ToolTipIcon.Info);
     }
 }
Example #8
0
        private void MainInterface_Load(System.Object sender, System.EventArgs e)
        {
            if (DateTime.Now.Day == 1)
            {
                this.FeesStructures.CreateOrShow();
                this.FeesStructures.MdiParent = this;
            }

            sqlm.ExecSql("select id from students where due>0");
            if (sqlm.count != 0)
            {
                NotifyIcon1.BalloonTipText  = sqlm.count + "  Students have to pay the fees";
                NotifyIcon1.BalloonTipTitle = "Fee Info";
                NotifyIcon1.ShowBalloonTip(100);
            }
            sqlm.ExecProc("exec update_leaves");
            sqlm.ExecSql("");
        }
Example #9
0
        private void hiệnLịchNgàyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PanelDisplay.Controls.Clear();
            dtpk.Value = DateTime.Now;
            var displayDate = new DisplayDate(dtpk.Value)
            {
                Size     = new Size(1009, 620),
                Location = new Point(0, 0),
                Dock     = DockStyle.Fill,
            };

            displayDate.MonthBtn += DateDisplay_MonthBtn;
            displayDate.Nextbtn  += DateDisplay_NextBtn;
            displayDate.Prebtn   += DateDisplay_PreBtn;
            displayDate.TDbtn    += DateDisplay_TDBtn;
            ActivateButton(ButtonDate, RGBColors.color1);
            PanelDisplay.Controls.Add(displayDate);
            this.Show();
            NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
        }
Example #10
0
 private void ShowTooltip(string STR)
 {
     NotifyIcon1.ShowBalloonTip(1000, "xxUSBSentinel", STR, ToolTipIcon.Info);
 }
Example #11
0
 private void NotifyIcon1_DoubleClick(object sender, EventArgs e)
 {
     this.Show();
     NotifyIcon1.ShowBalloonTip(100, "Số việc trong ngày", "Hôm nay có " + CountSchedule + " công việc và còn " + CountDeadline + " Deadline", ToolTipIcon.Info);
 }