I am using Visual Studio .NET to develop a windows application.
In my program, I have a set of similar controls(group box) which I would like to be set visible or invisible depending on the current state of the program.
The positioning are handled by the form design and I have named the group boxes groupbox1, groupbox2, groupbox3, ...
I would like to address the group boxes by their numerical position and so I wish to have an array of pointer such that I can:
groupbox[findactivegroup()].Visible = true;
for(int x=0; x<12; x++)
groupbox[x].Visible = false;
So I thought of something like:
But there is syntax errors in the declaration.
System.Windows.Forms.GroupBox  *groupbox = *System.Windows.Forms.GroupBox;
groupbox = groupbox1;
groupbox = groupbox2;
Could someone kindly enlighten me on this problem.
Thank in advanced.