在做数据库查询时,查询的字段值需要从另一个窗体的textbox中获取,怎么提取???

解决方案 »

  1.   

    public string aaa
    {
        get { return textBox1.text; }
    }这样你就可以通过属性来获取textBox1的值
      

  2.   

    form1:
    public static string aaa;form2:
    form1.aaa=textBox1.text;
      

  3.   

    http://www.cnblogs.com/zhenyulu/articles/34044.html
    看看这个,非常详细。
      

  4.   

    http://blog.csdn.net/zhzuo/archive/2004/04/05/22028.aspx