
But, when I remove the mouse from the boundaries of the button, and say, into another. īut the problem I'm facing now is that, if I hold the left click, but then I decide not to click a button, I drag the mouse away from the button, and release the left click, so that the button-click event won't be activated. Next, I had to make it so that two buttons that are overlapping don't get activated when the user clicks in the "intersection of both buttons." I handled this by using the same method I used above. This way, other windows overlap won't get affected. I know how to do this, I have a list of the class I call Window, loop through it, and I only interact with the first window to contain the location of the mouse-click.


Of course, if you clicked on a window, the one below it (they can overlap) shouldn't get affected. I tried writing code several different times, but I came to an error with each one.īasically, I'm trying to make "windows" similar to say Explorer, Paint, MediaPlayer, where you could drag then around, interact with them, minimize and close.
