fattyfatpants
Programmer
Good morning Gurus, I was wondering if I may enlist your help to solve a problem that I am having....
I am new to .NET but have been coding VB6 for about 2.5 years and am wondering how to do a for...each loop to iterate through all the controls on a form
as you know, in VB6 the code is something like
dim ctl as control
.
.
.
for each ctl in me.controls.count
if typeof ctl is TextBox then
do something
elseif typeof ctl is CheckBox then
do something
end if
next
how can I adapt this type of code to work with VB.NET?? Any suggestions would be greatly appreciated
I am new to .NET but have been coding VB6 for about 2.5 years and am wondering how to do a for...each loop to iterate through all the controls on a form
as you know, in VB6 the code is something like
dim ctl as control
.
.
.
for each ctl in me.controls.count
if typeof ctl is TextBox then
do something
elseif typeof ctl is CheckBox then
do something
end if
next
how can I adapt this type of code to work with VB.NET?? Any suggestions would be greatly appreciated