S
Steve Floyd
This is a WinForms question. In the VB6 world, you could
easily reference a control by name, e.g., if I want to
make the check box named chkFlag visible, I would do
this: frmMain.chkFlag.Visible = True.
In VB.NET, what is the proper way to reference controls
by name? frmMain.chkFlag does not work. chkFlag is in the
control collection of frmMain, so I could write a
generalized routine to recursively look thru the control
collections, but thats way too expensive.
easily reference a control by name, e.g., if I want to
make the check box named chkFlag visible, I would do
this: frmMain.chkFlag.Visible = True.
In VB.NET, what is the proper way to reference controls
by name? frmMain.chkFlag does not work. chkFlag is in the
control collection of frmMain, so I could write a
generalized routine to recursively look thru the control
collections, but thats way too expensive.