I am trying to update 64 bit displays in a For Next Loop.
I can pass One Object successfully but can't iterate through a collection in order.
Shouldn't GetNextControl do this?
It Retrieves the next control forward or back in the tab order of child controls.
Is there a Better method to do this?
fn70DiscreteIO statusIO = new fn70DiscreteIO();
for (int i = 0; i <= 64; i++)
{
UpdateIO(statusIO.DiscreteValue, i,
GroupBox.GetNextControl(System.Windows.Forms.ProgressBar ctrl, bool forward));
}
private void UpdateIO(int data, int bit, System.Windows.Forms.ProgressBar textControl)
{
if ((data & (1 << bit)) != 0)
{
textControl.Value = 1;
}
else
{
textControl.Value = 0;
}
}