问题描述
我有一个frmItem表格.在C#Visual Studio 2008 Windows应用程序中
我在其中有一个txtCompany的文本框.
在txtCompany的Enter Event上,我调用另一个表格frmHelp
在frmHelp表单中,出现一个包含公司名称的列表框.
我想将ListBox的选定值发送到frmItem的txtCompany控件.
在列表框的Enter事件中,我将代码编写为:
frmItem objfrmItem = 新 frmItem(lstCompany.SelectedItem.ToString()); objfrmItem.Activate(); 此 .Close();
我在frmItem的构造函数中收到此值.并更新了txtCompany.Text值
但txtCompany.Text仍未更新.
我正在等待您的支持.
谢谢Lot
I have a form frmItem. in C# Visual Studio 2008 Windows Application
In which i have a textbox of txtCompany.
On Enter Event of txtCompany I call a another form frmHelp
In frmHelp form a List Box Appears containing Company Names.
I want to send selected value of ListBox to txtCompany control of frmItem.
On Enter Event of List Box I write code as :
frmItem objfrmItem=new frmItem(lstCompany.SelectedItem.ToString()); objfrmItem.Activate(); this.Close();
I received this value in Constructor of frmItem. and updated the txtCompany.Text value
but txtCompany.Text still not updated.
I am waiting for your support.
Thanks a Lot
这篇关于从另一个称为form的变量刷新Form TextBox的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!