大家好!
我用的是vs2008 c#编写windows form application
我想实现的功能是这样的。
我有两个form,一个form1,一个form2,在form1中有一个按钮button1,他的在form1初始化的时候我让button1的visible属性为false。然后在form2中有个dataGridView控件,在这个控件的有一列是button形式的列,然后在这个dataGridView控件的cellClick事件被触发的时候,我希望form1的button1的visible属性改为true。 
请教各位了。

解决方案 »

  1.   

    1、form1的load事件中 this.button1.Visable=false; 设置button1不可用;
    2、form2设置一个传入参数 public partial class EditRecived : Form
        {
            Button Bt = null;
            public EditRecived(Button Bt)
            {
                this.Bt = Bt;
                InitializeComponent();
            }3、form2中的datagridview1写cellclick事件
    Bt.Visable=true
    4、form1调用form2的写法
    Form form2=new form2(this.button1);
    form2.show();我这个是最简单的一种。