Example #1
0
 private void panel4_MouseEnter(object sender, EventArgs e)
 {
     if (labelUsers != null && f2 != null)
     {
         labelUsers.Close();
         labelUsers = null;
         f2.Close();
         f2 = null;
         freeMemory();
     }
     if (f1 == null)
     {
         f1 = new Form();
         f1.StartPosition   = FormStartPosition.Manual;
         f1.FormBorderStyle = FormBorderStyle.None;
         f1.ShowInTaskbar   = false;
         f1.BackColor       = Color.Black;
         f1.Opacity         = 0f;
         f1.Location        = new Point(CheckClass.location.X, CheckClass.location.Y + 30);
         f1.AutoSize        = false;
         f1.Size            = new Size(196, 68);
         labelHome          = new lbHome();
         f1.Show();
         labelHome.ShowInTaskbar = false;
         labelHome.AutoSize      = false;
         labelHome.Owner         = f1;
         labelHome.Location      = new Point(CheckClass.location.X + 98, CheckClass.location.Y + 45);
         labelHome.Show();
     }
 }
Example #2
0
 private void panel8_MouseEnter(object sender, EventArgs e)
 {
     if (labelHome != null && f1 != null)
     {
         labelHome.Close();
         f1.Close();
         labelHome = null;
         f1        = null;
         freeMemory();
     }
     if (labelProducts != null && f3 != null)
     {
         labelProducts.Close();
         f3.Close();
         labelProducts = null;
         f3            = null;
         freeMemory();
     }
     if (f2 == null)
     {
         f2 = new Form();
         f2.StartPosition   = FormStartPosition.Manual;
         f2.FormBorderStyle = FormBorderStyle.None;
         f2.ShowInTaskbar   = false;
         f2.BackColor       = Color.Black;
         f2.Opacity         = 0f;
         f2.Location        = new Point(CheckClass.location.X, CheckClass.location.Y + 100);
         f2.AutoSize        = false;
         f2.Size            = new Size(201, 68);
         labelUsers         = new lbUsers();
         f2.Show();
         labelUsers.ShowInTaskbar = false;
         labelUsers.AutoSize      = false;
         labelUsers.Owner         = f2;
         labelUsers.Location      = new Point(CheckClass.location.X + 98, CheckClass.location.Y + 114);
         labelUsers.Show();
     }
 }