摘要: 问题描述:有2个UserControl:UserControl1 里有一个Button,UserControl2 里面有一个TextBox,这2个控件都加载到了主窗体Form1 上。要求的是,点击 UserControl1 的button 显示 UserControl2中TextBox输入的内容。一般来讲有2种方式:1. 公开属性2. 声明事件来看看这2种方式的操作代码:1. 公开2个UserControl的属性。并在Form1中使用public partial class UserControl1 : UserControl { public UserControl1()... 阅读全文
posted @ 2013-10-29 14:40 tomin 阅读(3629) 评论(1) 推荐(0) 编辑