C#中使用控件数组
2007-06-20 10:24
411 查看
int iIndex;
Button[] btns = new Button[3];
for (iIndex = 1; iIndex <= 2; iIndex++)
{
btns[iIndex] = new Button();
btns[iIndex].Left = button1.Left;
btns[iIndex].Top = button1.Top + 100;
btns[iIndex].Visible = true;
this.Controls.Add(btns[iIndex]);
}
供大家学习之用,如有更好的,请多多指教!!!
Button[] btns = new Button[3];
for (iIndex = 1; iIndex <= 2; iIndex++)
{
btns[iIndex] = new Button();
btns[iIndex].Left = button1.Left;
btns[iIndex].Top = button1.Top + 100;
btns[iIndex].Visible = true;
this.Controls.Add(btns[iIndex]);
}
供大家学习之用,如有更好的,请多多指教!!!
相关文章推荐
- C#编写windows桌面应用程序将控件放入数组以便在循环中使用
- C#中使用DataGridView控件显示数组中的内容
- C#控件数组使用方法.
- c#学习体会:使用 ref 和 out 传递数组(downmoon)
- C#中DataGridView控件使用大全
- c#+Winform实现自定义的“复制、粘贴”右键快捷菜单,多个控件共享使用一个右键菜单。
- C#派生子类控件的使用经验(C#自定义控件)
- C#的Winform中使用用户控件
- C#中的WebBrowser控件的使用
- C#UI控件使用总结
- c#经典编程实例(一基本的输入输出和循环数组的使用)
- C#实现控件数组
- HOW TO:使用 Visual C# .NET 使 UserControl 成为设计时控件容器
- c# BackgroundWorker控件使用方法
- C#跨线程更新控件(UI)使用delegate方式
- C#验证控件validator的简单使用
- Visual Studio 2010——C#的通用对话框控件的使用
- 使用C#的用户控件创建ActiveX
- C# Chart 控件快速使用
- 对象数组空指针异常说明——C#中使用对象数组必须分别为其开辟空间