Google this page is not a duplicate
Laptop display goes off when closing lid
Right click on your desktop and select properties
Click Screen Saver
In here you will find all the options to shutdown, hibernate etc. when on battery or adapter and also what to do when shutting the lid,
set these as required.