In Windows 10, you can choose what happens when you close your monitor lid by right-clicking the Battery icon and selecting Power Options. Select Choose what closing the lid does from the menu on the left, then go to the drop-down menus for When I close the lid and pick Do nothing.