Hell All
Ok, not quite so elementary this time : I have written a dozen pages or so of code and am therefore getting used to Visual C# --- of which I continue to find both the editor and in particular the debugger superb, no fooling.
Here's my current preoccupation.
I have a central chunk of 'pure C' which contains nested "for . . ." loops thus:
for (v=0; v<100; v++)
for (w=0; w<200; w+=5)
for (x=0; x<100; x+=2)
for (y=0; y<50; y++)
for(z=0; z<100; z++)
{
(do some stuff . . .)
}
}
}
}
}
}
;
Now;
("some stuff") isn't enormously complex, but just the same we're looking at what, a billion or two iterations here?
Even with today's superchips, this takes long enough to make some kind of progress indicator a good idea, or the user may think he machine has gone to sleep. I know there's a progress bar, but what I thought I'd prefer is a small rectangle --- a label, for instance, up in one corner --- which simply switches from (say, a nice Salmon to a nice pale blue and back again, every time we reach the end of maybe the x loop?
It seems to me that the code for doing this is, colloquially:-
if label.Background = Salmon
{ label.Background = PaleBlue; goto
yloopnext; }
label.Background = Salmon;
yloopnext:
--- or something in that price-range?
But I don't think you can just use a straight assignment in this fashion, can you?
Please can somebody suggest a neat way of doing this? That is, switching a small rectangle from one colour to another and back,
programmatically?
Cheers

Martin Woodhouse