遍历控件 vb.net 2005
来源:互联网 发布:下载打扑克软件 编辑:程序博客网 时间:2024/05/21 07:27
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Cont As Control
Dim i as integer
txtbox1.Text = "txt1"
txtbox2.Text = "txt2"
'Controls(0).Text = "Hello"
Controls.Item(0).Text = "Hello"
For i = 0 To Controls.Count - 1
Debug.WriteLine(Controls(i).GetType)
'Me.Controls(ii).GetType.Name()
Next
i = 0
Dim T As Object
For Each Cont In Me.Controls
Select Case Cont.GetType.Name
Case "CheckBox"
MsgBox("is checkbox")
Case "TextBox"
MsgBox("is textbox")
Case "Label"
MsgBox("Label")
Case "Button"
MsgBox("is Button")
End Select
i += 1
If TypeOf Cont Is TextBox Then
MessageBox.Show("The control is a textbox." & _
" Control:" & i & vbCrLf & Cont.Text)
ElseIf TypeOf Cont Is Button Then
MsgBox("The control is a button." & " Control:" & i)
ElseIf TypeOf Cont Is CheckBox Then
MsgBox("The control is a checkbox." & " Control:" & i)
ElseIf TypeOf Cont Is Label Then
MsgBox("The control is a Label." & " Control:" & i)
End If
Next Cont
End Sub
- 遍历控件 vb.net 2005
- vb.net 2005 控件数组
- [VB.NET]如何遍历web窗体中所有的控件
- vb.net 遍历Dategrid
- 转载-EAN13条码控件(VB.NET 2005)
- 控件集合VB.NET用Controls集合对为空的控件进行遍历
- vb.net隐藏控件
- VB.NET 控件说明
- [VB.NET]datagridview控件
- [VB.NET]richtextbox控件
- vb.net控件简述
- vb.net控件简述
- vb.net--Label控件
- vb.net递归遍历操作TreeView控件树的实例代码
- asp.net遍历控件
- ASP.NET 控件遍历
- vb.net动态控件数组
- VB.NET DataGridViewComboBoxColumn控件赋值
- 指定小数位转换 vb.net 2005
- 用div的高度分页2
- 关于光标操作,终于搞定了FF下DIV的光标控制
- 用div的高度分页3
- 设计模式之 if-else
- 遍历控件 vb.net 2005
- 构建成功web应用的十项黄金法则
- 测量运行时间 vb.net 2005
- 使用Repo在Windows平台下載Android原始碼
- 【转】10个著名的思想实验
- ZOJ 1713 haiku AC代码!
- HDU 1575(数论,矩阵乘法+求幂)
- Qt学习之路(16): Qt标准对话框之QColorDialog
- “写出printf的输出结果”——你能看到什么?