不知是我太苯了,还是你没写明白:
private void listView1_ItemActivate(object sender, System.EventArgs e)
它是FORM2的吗?
那form2 Myf=new form2 ();
什么意思?

解决方案 »

  1.   

    現在回答問題的人﹐我不太想說什么的。為什么老是提示一些字面錯誤﹐講一大堆﹐有什么意思。明顯form2 Myf=new form2 ();是發貼是太急了﹐改成Form1 Myf=new Form1();。其實問題關鍵 是這種法方行不通。。
      

  2.   

    form2 中
    public Form1 frm;
    private void listView1_ItemActivate(object sender, System.EventArgs e)
    {
    frm._type_txt =listView1.SelectedItems [0].Text;
    this.Close ();
                   frm.focus();
                      }
    在form1中给frm赋值.
      

  3.   

    主窗體FrmMain,有一個textBox1 一個buttonBox1
    打開窗體:FrmOpen 有一個textBox;
    把FrmMain中的textBox1的值傳入FrmOpen 中textBox;
    1、在FrmOpen 聲明一個變量
     public string s_name;
    private void FrmOpen_Load(object sender, System.EventArgs e)
    {
    textBox1.Text=s_name;
    }2、在FrmMain的代碼如下
    private void button1_Click(object sender, System.EventArgs e)
    {
    FrmOpen fg=new FrmOpen ();
    fg.s_name=textBox1.Text;
    fg.Show();

    }
      

  4.   

    http://www.c-sharpcorner.com/Code/2002/Aug/PassingDataInForms.asp