Ejemplo n.º 1
0
        private void tmrFadeout_Tick(object sender, EventArgs e)
        {
            if (this.Bounds.Contains(MousePosition)) //Cursor in the message? reset opacity to 1 and restart timeout timer
            {
                this.Opacity  = 1;
                secondsPassed = 0;
                tmrTimeout.Start();
            }
            else //Cursor out of the message? safely reduce opacity "slowly"
            {
                this.Opacity -= 0.02;
                if (this.Opacity <= 0)
                {
                    tmrFadeout.Stop();

                    tmrFadein.Dispose();
                    tmrFadeout.Dispose();
                    tmrTimeout.Dispose();
                    this.Dispose();
                    MessageFormManager.RepositionActivePopups();
                }
            }
        }
Ejemplo n.º 2
0
 private void lblExit_Click(object sender, EventArgs e)
 {
     this.Dispose();
     MessageFormManager.RepositionActivePopups();
 }