In my program I have a hint button for a puzzle that randomly selects a textbox, populates it with a number, and changes its background color.

The issue is that the hint button works correctly for the first 2 hits, but after that the previous textboxes that were colored will go back to the default color and some other textbox then the randomly selected one will change color.

Are you resetting your values?
Do you have the code that chooses the textbox and content and color in a function?

This article has been dead for over six months. Start a new discussion instead.