Shutdown help?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
9 posts
Page 1 of 1
Hi Guys,
If i want to shutdown i use
Thanks
If i want to shutdown i use
Code: Select all
but i forgot the code to make it timed, like if i want it after 1 minute ( 60seconds )
Shell("shutdown -s")
Code: Select all
' but it didnt work? any other codes? i dont know if this is right but ? any ideas?Shell("shutdown -s time:60")
Thanks
Get a timer and set it on enabled and add this code and add 1 label and make it say the text 0
Code: Select all
Label1.text=label1.text + 1
If Label1.text="60" then
Shell("shutdown -s")
#codedrive , i cant use ur code since i need it on many durations,
#muttley1968 im leaving home now when im back i will check,
#people u can post more codes if u wanna
#muttley1968 im leaving home now when im back i will check,
#people u can post more codes if u wanna

Thanks #muttley1968 worked great, but now instead of new topic shutdown -s for shutdown, -r for restart -l for logoff what is for the "sleep"?
thanks
thanks
For sleep mode use this
Code: Select all
Shell("cmd /c rundll32.exe powrprof.dll,SetSuspendState 0,1,0")
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023