If you have the latest Windows updates, you have access to Game Mode.
Instructions in this article apply to Windows 10.
Its easier now with the creation of Game Mode.

When Game Mode is enabled, Windows 10 configures the appropriate prefs automatically.
All white-listed Windows games trigger this feature.
To enable Game Mode you simply agree to by placing a check the option in the prompt that appears.

The best way to explore Game Mode is to get a trusted game app from the Windows App Store.
The first time you start the Windows game the option to enable Game Mode will appear.
(parameters is the cog on the left side of the Start menu.)

SelectGamingin the Windows controls window.
SelectGame Modeon the left side of the Gaming window.
If desired,selecteachentryon the left to see other options and prefs:
terminate the Gaming window when finished.

Any tweaks selected will be applied.
Open aWindows gameyou want to play.
Press and hold theWindowskeyon your keyboard and then select theGkey (Windows key+G).
SelectSettingson theGame Barthat appears.
From theGeneraltab, go for the box forGame Mode.
If you want to explore the Game Bar now, open a Windows game before continuing.

All you need is an open program, like Microsoft Word or the Edge web internet tool.
The Game Bar offers access to options and features.
One notable feature is the ability to record the game as you play it.
The Game Bar also offers the option to broadcast your game.
you’re able to take screenshots too.
The parameters in the Game Bar include much of what you will find inSettings>Gaming.
One of those options is to launch the Game Bar by using the Xbox button on a gaming controller.
For example, it’s possible for you to use theWindows 10 Xbox game DVR to record your screen.
This makes creating gaming videos a total breeze.