listbox双击以后传值 http://bbs.csdn.net/topics/390128592 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/cosoft/archive/2011/08/08/2130659.html 不知道有多少种传值方式。。我最先想到的是Form1中定义一个事件,在Form2 双击Listbox时,判断此事件不为空,就调用此事件,传入相应参数。 form1中的textbox1的modifilers设为Public, private void button1_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.ShowDialog(this); } form2中: private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { Form1 f1 = (Form1)this.Owner; f1.textBox1.Text = listBox1.SelectedItem.ToString(); } 异步委托 投票? DataGridView 追加行如何实现? 文本文件处理。50分 C#中 用GetOleDbSchemaTable如何获取Excel文件指定位置的表名 修改INI键名的方法 控件编写 判断小于12的正则表达式怎么写! richbox 回车插入文本问题 C# 开发Socket Server,怎么实现百万级用户同时在线? 【求解决】多线程的界面交互(WPF和ASP.NET)。 请教高手:如何判断word里面是否有内容。 C#关于Windows Service 服务
我最先想到的是Form1中定义一个事件,在Form2 双击Listbox时,判断此事件不为空,就调用此事件,传入相应参数。
form1中的textbox1的modifilers设为Public,
private void button1_Click(object sender, EventArgs e)
{ Form2 f2 = new Form2();
f2.ShowDialog(this);
} form2中:
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Form1 f1 = (Form1)this.Owner;
f1.textBox1.Text = listBox1.SelectedItem.ToString();
}