访问量: 140次,访客数: 140人,浏览量: 1次 
首页  编辑  

根据控件名获得控件实例

Tags: /C#/界面处理/Form/   Date Created: Tue Jun 10 2008 01:17:47 GMT+0000 (Coordinated Universal Time)

private void button1_Click( object sender , EventArgs e)

{  

    Control [] vControls = Controls . Find( "button1" , true );

    foreach ( Control vControl in vControls)

       vControl . Text = "Zswang ;

}