child 中随便搞个控件Focus不就可以了,实在不行就me.Focus
解决方案 »
- System.Management 提供程序加载失败
- 數據的表示形式
- 如何用C#得到本机上Excel的版本呢?
- 用正则替换html网页中的内容的问题
- 不知道是不是panel的bug,大家帮我看看啊。
- 加急在线:特简单(http://localhost/LinSoft/javas/dd.htm)与(C:\Inetpub\wwwroot\LinSoft\javas\dd.htm)有什么不同
- winform的panel滚动条位置问题
- 问个uiautomation访问ms word的问题
- Lable的背景可以设置为透明吗?
- WCF,请教一下回调
- 怎样获得sql server2000中某个数据表的结构信息?
- 一个UI多线程的问题,快些进来啊。
我不知道你的Form是WinForm还是WebForm,如果是WinForm的话,你可以这样处理:
public class DataBody : System.Windows.Forms.Form
{
public static string Sub_Content_One;
public static string Sub_Content_Two;
}
设计这样一个数据传递承载类来进行窗体间数据的存储;
public class Form_Parent:DataBody
{
//你的父窗体
string strFromChild = Form_Child.Sub_Content_One;
MessageBox.Show("我已经收到了,内容是" + strFromChild);
}
public class Form_Child:DataBody
{
//你的子窗体
Form_Child.Sub_Content_One = "我要传给你";
}
当然,这样做的前提是,你的Form_Child只是Hidden()起来了,而没有被Close()掉;
this.BindingContext[objMyDataSet,"Categories"].EndCurrentEdit();
具体看,
http://blog.csdn.net/zhzuo/archive/2005/01/03/238273.aspx