private void undoToolStripMenuItem_Click(object sender, EventArgs e) { if (((List <Bitmap>)(ActiveMdiChild.Tag)).Count > 1) { ((List <Bitmap>)(ActiveMdiChild.Tag)).RemoveAt(0); } ActiveMdiChild.Invalidate(); }