导出toolStrip1中的图标

            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("图片导出成功!"); 

 

posted @ 2018-03-05 13:49  simadi  阅读(188)  评论(0编辑  收藏  举报