Winforms,Data Received,Shutdown system

Posted by Raja_89 under C# on 8/19/2015 | Points: 10 | Views : 410 | Status : [Member] | Replies : 1
I am developing an winform application has many forms [F1,f2,f3,f4]
f1 is the starting form
Based on the user form navigation will be there
After all is over it will redirect to f1 irrespective of various forms
If i receieved power failure command from serial port system will shutdown automatically [irrespective of forms]

Example if i receive cmd in f3
it will shutdown the system [I think we can put a serial port control in all forms and then check ]
Is there any other way



Posted by: Rajnilari2015 on: 9/28/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

System.Diagnostics.Process.Start("shutdown","/s /t 0");
Also you can look at the WMI ( ) way to do the same.

Thanks & Regards,
RNA Team

Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response