how to shutdown

radhe

New member
Joined
Jan 4, 2005
Messages
4
Programming Experience
Beginner
Hello
please help me because the time is running out for my project it is very urgent.

I am doing a small project in Vb.net regarding calculations of sessions of a students.My doubt here is Is there any code in VB.NET to shutdown the computer if it is idle for 15 minutes.This shut down must be done through the application we have designed in Vb.NET.Please tell solution to my problem....

sincerely,
Radhe Krishna
 
you can use the following code to shutdown the PC

shell("shutdown -s")

it will display a dialogbox and the Pc will shutdown after 30 seconds.

Use timer to shutdown PC after 15 mins
 
shell("shutdown -s")

this only works if both the computer the application is running on, and the target computer is running windows xp & newer

if there are systems running an older version of windows than winxp you'll want to look into api calls
 
Last edited:
Back
Top