Exemple #1
0
        private void label4_Click_1(object sender, EventArgs e)
        {
            playsoundclick();
            Form bg = new Form();

            try
            {
                using (Instruc q = new Instruc())
                {
                    bg.StartPosition   = FormStartPosition.Manual;
                    bg.FormBorderStyle = FormBorderStyle.None;
                    bg.Opacity         = .50d;
                    bg.BackColor       = Color.Black;
                    bg.WindowState     = FormWindowState.Maximized;
                    bg.TopMost         = true;
                    bg.Location        = this.Location;
                    bg.ShowInTaskbar   = false;
                    bg.Show();
                    q.Owner = bg;
                    q.ShowDialog();
                    bg.Dispose();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                bg.Dispose();
            }
        }
Exemple #2
0
 private void panel7_Click(object sender, EventArgs e)
 {
     playsoundclick();
     if (!TT_game)
     {
         TT_game = false;
         if (CheckHaveImage && Ispause)
         {
             pnConPau.BackgroundImage = Properties.Resources._continue;
         }
         timer1.Stop();
         Form bg = new Form();
         try
         {
             using (Instruc q = new Instruc())
             {
                 bg.StartPosition   = FormStartPosition.Manual;
                 bg.FormBorderStyle = FormBorderStyle.None;
                 bg.Opacity         = .50d;
                 bg.BackColor       = Color.Black;
                 bg.WindowState     = FormWindowState.Maximized;
                 bg.TopMost         = true;
                 bg.Location        = this.Location;
                 bg.ShowInTaskbar   = false;
                 bg.Show();
                 q.Owner = bg;
                 q.ShowDialog();
                 bg.Dispose();
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
         finally
         {
             bg.Dispose();
         }
     }
 }