This AutoHotkey script doesn't suffer from some of the performance issues that DDrawCompat (or any other Direct3D or DirectDraw "wrapper") may introduce when attempting to accomplish the same thing.
After running the program or game and putting it in fullscreen windowed mode, press the left Windows key and the left mouse button simultaneously to remove the Windows titlebar. Press the left Windows key and the right mouse button simultaneously to display the Windows titlebar.
Note that if you run a program or game as an administrator, or have any of the various Windows compatibility modes enabled, you will need to execute this AutoHotkey script as an administrator for it to function when running the program or game.