This problem exists using GM8 with Windows 7.
Let's say you make a button, and it plays a sound when you hover over it or when you leave it (mouse enter, mouse leave).
When you minimize your game, it acts as if the window is still there and will play the sounds when your cursor goes in and out of where the button would normally be if it was not minimized.
I've tried the built-in mouse functions, and I've tried building the events manually, and yet it still happens.
It seems as though the only way to stop it from happening is to "freeze the game when form loses focus". Which is great for minimizing, but not great while it is not minimized. In other words, this is not an option for me.
There are no functions to test if the window is minimized or not.
Using window_mouse_get_x() window_mouse_get_y() window_views_mouse_get_x() window_views_mouse_get_y() makes no difference in this situation either.
I am going to test in Vista, and other gm versions soon, although I have never witnessed this problem in the past.
At last resort, I'll use a task bar or window handle dll to solve the problem.
Anybody have any thoughts on this?
EDIT #1: Changed the title because not only does it play sounds, but also everything handled in the mouse enter, mouse leave leave events.
EDIT #2: Tried a couple different System Tray dll's, and even when minimized to tray, this still happens. Might need a dll that has a check if minimized.
EDIT #3: Still happens in GM7 on Windows 7... testing on Vista next.
EDIT #4: Tested GM8 on Vista, and this still happens. I conclude that this is in fact a bug in the Game Maker program. This should not behave this way.
Edited by AtomicUs5000, 14 January 2010 - 03:42 AM.