private void button1_Click(object sender, System.EventArgs e)
{
Form2 myform=new Form2(this.textBox1.Text);//this.textBox1.Text就是查询条件
myform.Show();//myform.ShowDialog();
}
在form2中
public Form2(string temp)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.textBox1.Text=temp.Trim();//可选 //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
{
Form2 myform=new Form2(this.textBox1.Text);//this.textBox1.Text就是查询条件
myform.Show();//myform.ShowDialog();
}
在form2中
public Form2(string temp)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.textBox1.Text=temp.Trim();//可选 //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
{
/// <summary>
/// Company_Information 的摘要说明。
/// </summary>
public class Company_Information
{
public Company_Information()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static string companyid;
public static string companyname;
}
}
///////////////////////////////////////
在Form1 中这样引用:
private void Edit_Price_Load(object sender, System.EventArgs e)
{
label2.Text="双击选取"+class1.companyname.ToString() + "公司代理的产品";
CreateTree();
}
同意declude() 的做法。很简单。
也容易看懂。
一直改进中。
因为很方便
速度也会很快
还可以做动态效果
看金山的几个软件效果