We can't really help you that much here, because we have no idea how you are implementing your objects the user is searching for. But by the sound of it, you are implementing them as buttons with an image on them - which isn't a brilliant way to do it - and so setting the
Visible
property to
false
should work, provided it's the right instance of the button, and not a new one you just created. If you are saying
Button btn = new Button();
btn.Visible = false;
Then that won't work because you aren't affecting the actual button that the user is looking at and interacting with.
Exactly how to implement this game will depend on the environment you are running in: a WinForms solution would be very different from a web-based solution for example.
But...for I'd try not to use buttons at all.
For example, for WinForms, I'd draw the background onto a Panel using the BackgroundImage property, and handle the Paint event to "add" the objects on top of that image. I'd then handle the MouseClick event for the panel and check if the user was inside one of the objects. If so, remove it from the "to be drawn" list and Invalidate the panel to force a redraw. By setting
Form.DoubleBuffered
to
true
the use shouldn't see anything happen.
There are a lot of ways to make the "hit testing" easier: there is a GraphicsPath class which can describe where your object is and what shape it is, and it has a IsVisible method which checks a Point to see if it's inside it or not.
It's a bit more work, but it's going to produce a better result than buttons!