when I use a loop:
It only works for controls added in design view rather than those previously added programatically. Why is that & how do I change it?
Thanks
Code:
For each mycontrol in panel1.controls
if typeof(mycontrol) is textbox then
dim mytextbox as textbox = mycontrol
label1.text = "dog"
elseif typeof(mycontrol) is label) then
dim mylabel as label = mycontrol
label1.text = "cat"
End If
Next
It only works for controls added in design view rather than those previously added programatically. Why is that & how do I change it?
Thanks
Last edited: