First you must have installed on your computer Visual Studio 2012.
1 - Open Visual Studio 2012.
2 - Search for the New Project option.
3 - Put a name to your project. And press OK.
4 - Look for the object "Button" within the Toolbox and double-clicks.
5 - Double-click on "Button1" and we put the code.
6 - Now type the command "shell (" shudown -s -t 1200 ")" observe the image below.
8 - Press "Button1" and note the windows message warning about shutting down your computer in 20 minutes.
"1200" seconds is equal to 20 minutes.
"-s" is equal shutdown.
"-t" defines time in seconds for command execution.
"-a" Cancels the shutdown.
9 - To abort the shutdown use (shutdown-a) run on windows.
'Thanks for reading
Make your comments









Nenhum comentário:
Postar um comentário