
June 26th, 2012, 12:56 AM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 3
Time spent in forums: 1 h 35 m 28 sec
Reputation Power: 0
|
|
Trouble with the mouse_enter event
Hello, I'm trying to make a minesweeper program. I'm mostly finished, but now I'm trying to add the little details.
So you know how in minesweeper when you hold down your mouse button and move it around, the block that it's in presses down, and when you move it out of that block it pops back up?
I have it now so that if the user presses the mouse button inside of a box then it presses down, and if they move the cursor outside of the box and then release the mouse then it pops back up.
My problem is this: I can't get it so that when I enter a new box without releasing the mouse button, that box goes down.
My method right now is to get an "If" statement in the Mouse_enter and Mouse_leave events for each box that checks whether the mouse is held down or not using a Boolean.
But it isn't working because when the mouse enters the box with the button held down from a different box, it doesn't do anything. It only performs the code if the button isn't held down.
I was wondering if anyone knows why this is that it doesn't perform the code if the button is held down already? Or, is there an easier way to do this? Thank you in advance.
I apologize if the way I worded this is confusing. My thoughts are pretty jumbled. If you need clarification about anything, please ask.
|