But has two reasons.1stly if you are playing really old 90s games then this problem is because of Directx and video rendering.But if you have this problem with new games then, it is because you game resolution is set beyond your monitor resolution. This sounds odd, but its the reality, as i was having the same problem with splinter cell conviction(although i am having a ati 5670, but it doesn't matter) You can try to limit the max resolution by changing it through graphics card control center. Moreover the nvidia 8400GS doesn't have enough juice for todays games.so, i think its time for a GPU upgrade.
If you are playing today's games, then is because of the capacity of the graphics card. You have not mentioned your other system configuration. The hang can depend on many things. Also check your monitor's resolution..