日期:2014-05-17 浏览次数:20843 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
FormCollection collection = Application.OpenForms;
foreach (Form form in collection)
{
if (form.Name == "Form2")
{
((Form2)form).SetImage();
form.Select();
}
else if (form.Name == "Form3")
{
((Form3)form).SetImage();
form.Select();
}
else if (form.Name == "Form4")
{
((Form4)form).SetImage();
form.Select();
&