Can't Escape the Game

For a little fun prank, I want to make a little game to were you have to complete it before you can exit the game. How would I make this?

if you mean like a thing where you cant exit out of the program then i belive you would need javascript to make this possible(idk how to help with that sorry)