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.

Recommended Answers

All 2 Replies

We won't be able to help you without seeing the relevant code.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.