im making a game, called memory game.

i don't know the exact codes to make a picturebox move when clicked. i saw a game file that becomes a gif image when clicked, then it randomizes the last image every start of the game.
i wanted to make something like that, but i cant understand the codes in that file.

can someone help me?
or give me alternatives on what is the better way in making a memory game? like how to show the pictures etc?:-/


*memory game is where you need to match two similar pictures.

Recommended Answers

All 2 Replies

Essentially what you want to do is create an array of images and hide them off the form to start.

Now on load or on push of a button simply run a rand() function and call to array image[x]

Display it on a grid or wherever you want the user to see it.

Now when a user clicks on an image store that globally or in a .dat file to reference later when checking if the answer is correct.

Are you looking for the actual code or just the logic?

OMG.

thanks! the logic did help. a lot. :)
i already created an array of picturebox (is it okay?), but i don' know where to start my codes. if i what code should come first? will i use if-then statement? and where will i get them? i really need a hand.

thanks to you for the logic. :)

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.