foreach (ToolStripItem c in toolStrip1.Items) { if (!(c is ToolStripButton)) continue; var btn = (ToolStripButton)c; btn.Image.Save(String.Format("{0}.png",c.Name)); } MessageBox.Show("图片导出成功!");
foreach (ToolStripItem c in toolStrip1.Items) { if (!(c is ToolStripButton)) continue; var btn = (ToolStripButton)c; btn.Image.Save(String.Format("{0}.png",c.Name)); } MessageBox.Show("图片导出成功!");