views:

54

answers:

1

I have fully programmed my Minesweeper; however, I was having difficulty trying to get the same result as in the original minesweeper for when a user clicks and moves the mouse around while still right clicking. You may notice that in the original Minesweeper, when a user does as explained, the tiles that the user goes to will then look blank. If the user releases the mouse, the current tile they hovered to will become the clicked tile. In my Minesweeper, the tile I click on is the only one that will look blank, and when I hover over to the next tiles, they do not get blank like the first one I clicked on. Then when I release my mouse button when over to another tile, the very first tile I clicked on is the one that gets uncovered. Here is what I already have used. I have the MouseDown event which checks to see if the game has been started to begin the game timer. It also has some color properties for tiles when I click on them and I set a boolean to true or false depending on the user left or right click. I have the MouseUp event which looks at the boolean to determin what the user had clicked on the mouse so I know if I flag or simply click to uncover. Then I have the MouseEnter and MouseLeave which are needed to yield the proper glow I want for the tiles. What should I do to get the same results as in the original Minesweeper with the MouseDown and MouseEnter into other tiles? I tried many other things such as MouseEnter, MouseMove and MouseHover, but all seem to yield the same crummy result as what I already have.

Just another piece of information, the MouseEvents are built in to a UserControl which I then use as my tile in Minesweeper. It almost as if when an event is active, another one cannot be done at the same time.

+1  A: 

You might want to consider, DragOver and Drag related events

Vivek Bernard
Thanks for the tip, I will try it out
Jared987