There's a few ways to skin this cat. You can track the actual text and look for mismatches, or handle the ForeColorChanged
event, but the simplest way I think in your case is to just "turn off" the event subscription when you do your reset.
For example, in your RunButton_Click
method:
private void RunButton_Click(object sender, EventArgs e)
{
AHReg.TextChanged -= AHReg_TextChanged;
resetControlColor(); //this function sets the text color to Black
AHReg.TextChanged += AHReg_TextChanged;
}
If you need that event to be active in your resetControlColor() function then you'll need to come at this at a different angle, but that's the simplest away to approach it.