private void mouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { switch(((CustomButton)sender).Tag.ToString()){ case "RankingTag": if(ranking == null){ ranking = new Ranking(); ranking.Tag = this; } ranking.Show(this); this.Hide(); break; case "ExitTag": Application.Exit(); break; case "NewGameTag": Game newGame = new Game(); newGame.Tag = this; newGame.Show(this); this.Hide(); break; } } }