When playing in window mode:
1. Minimize d2 (just click outside the window)
2. Press up the task manager (ctrl+alt+del)
3. Right click on you d2 program (not the process)
4. Click maximize in the popup-menu
5. Now d2 will probably be displayed behind your task manager
6. Close down the task manager (d2 minimizes in the bakground)
7. Click on d2 in the taskbar
Check if this works