由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - A VB Question from a beginner
相关主题
control array in .net自动化的问题 (WebBrowser)
一道mcad考试题求解(有关DataAdapter)A Bug about TextBox?
Reference type问题Chaago.com
问题又来了.求教:从条形码扫描器Scanner读数据到VB .NET程序
how to let button response 'return' key?请教:asp.net 如何使两个validation有顺序的执行
C# problemsHow to create this Asp.net Textbox
datagrid help请问实现关注计数功能
数据绑定问题RequiredFieldValidator是什么时候做validate的?
相关话题的讨论汇总
话题: mycontrol话题: mysub话题: vb话题: question话题: end
进入DotNet版参与讨论
1 (共1页)
z*****n
发帖数: 83
1
I want to do something to all textboxes in a form by
the following code (e.g. add 1 to .text)
call mysub(myform)
Private Sub mysub(ByVal myContainer As Object)
Dim myControl As Control
For Each myControl In myContainer.Controls
If TypeOf myControl Is TextBox Then
'do something to mycontrol
ElseIf myControl.HasChildren Then
Call mysub(myControl)
End If
Next
End Sub
now the strange thing is all my numericalupdown controls
are also change
L*********r
发帖数: 92
2
You can use spy++ to verify your assumption.
If it is true, you can try use parent of control.
By the way, if you do not implement library, I prefer a simple way to set all
textbox with same prefix name.
1 (共1页)
进入DotNet版参与讨论
相关主题
RequiredFieldValidator是什么时候做validate的?how to let button response 'return' key?
asp.net objectdatasource问题C# problems
textbox and radiobuttonlistdatagrid help
synclock question数据绑定问题
control array in .net自动化的问题 (WebBrowser)
一道mcad考试题求解(有关DataAdapter)A Bug about TextBox?
Reference type问题Chaago.com
问题又来了.求教:从条形码扫描器Scanner读数据到VB .NET程序
相关话题的讨论汇总
话题: mycontrol话题: mysub话题: vb话题: question话题: end