通过在窗体中放置控件实现所需功能。
选择菜单 [工程]--[部件],显示控件选择列表。
名称 | 说明 | 所在库 |
---|---|---|
ImageList | 图象集合 | Microsoft
Common Control 6.0 |
TabStrip | 选项卡 | |
Toolbar | 工具栏 | |
StatusBar | 状态栏 | |
ProgressBar | 进度指示器 | |
TreeView | 树结构 | |
ListView | 项目列表 | |
Slider | 滚动条 | |
ImageCombo | 图像组合框 | |
Animation | 无声动画 | Microsoft
Common Control-2 6.0 |
UpDown | 微调 | |
MonthView | 月历 | |
DTPicker | 日期输入 | |
FlatScroolBar | ||
CoolBar | 可调工具栏组 | Microsoft
Common Control-3 6.0 |
Winsock | 网络通讯 | Microsoft Winsock Control 6.0 |
设置控件的 Index 属性后,即成为控件数组。相应地,控件的事件自动增加一个 Index 参数。
名称 | 说明 |
---|---|
LBound | 最小下标 |
UBound | 最大下标 |
Count | 控件数目 |
Item | 控件集合,默认 |
Load myObject( myObject.UBound + 1 ) ' 在数组最后增加 |
Unload myObject( index ) ' 可删除任意上述增加的控件 |
Me.Controls.Add("VB.CommandButton", "Command1sss") |