471,605 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Displaying Shut Down dialog

Is there any code so that I can call shut down dialog box from my
program?

Under shut down dialog box I mean the one that is shown when you click
on Start -> Shut Down.

Thanks in advance.

Dec 2 '05 #1
1 2178
Add a reference to system directory\shell32.dll
Add the following code:

Shell32.ShellClass c = new Shell32.ShellClass();
c.ShutdownWindows();

I tested this and it worked on Win2K pro.

Thi

Dec 2 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Claire | last post: by
4 posts views Thread by Diogo Alves - Software Developer | last post: by
5 posts views Thread by Anders Both | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.