I will test if you are trying to fix focus/blackscreen problems.
Currently I'm on 2.0.0.cr2 as it's the only version I've found that works on my arcade cabinet. Most versions of AM work fine on my desktop.
cabinet: Win7 64bit SP1 aerotheme (necessary) Intel HD2000 integrated graphics.
desktop: Win7 64bit SP1 aerotheme (necessary) NVIDIA GeForce GT 710
I just tried 2.5.0 and your 2.5.1exp with fresh mame0203b 64bit binary.
They both exhibit this bad behaviour:
After loading AM, selecting a game (frogger) gives Blackscreen.
Game is not running in background. Alt+Tab, windows Key, Alt+F4, ESC all seem to do nothing,
I have to Ctrl+Alt+Del and select Task Manager.
I can then see the various windows tabs in the task bar, and can select Mame.
When I Esc out of the game, the TaskManager is in front of AM, but I can click onto AM
from there everything works fine from then on.
If I do an exit to desktop and then restart AM, I'm back to square1: I get the blackscreen when select a game.