Which game? For Quake or possibly Doom3 engine games, you can bind keys to "set in_mouse 0" and "set in_mouse 1", IIRC. The first bind will release the mouse and the second will give the mouse back to the game.
Windowed mode need not be required for this.