I wonder if anyone know how to open this box with a c# command?
Thanks in advance!
I wonder if anyone know how to open this box with a c# command?
Thanks in advance!
You must add reference to Shell32.dll (COM -> "Microsoft Shell Controls And Automation") and use this code:
Shell32.Shell shell = new Shell32.Shell();
shell.ShutdownWindows();
Add a reference to C:\Windows\System32\Shell32.dll. After you do this, use this code:
Shell32.ShellClass sc = new Shell32.ShellClass();
sc.ShutdownWindows();
This will display the shutdown dialog as normal.