Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I shut down my PC usig vb code?

Status
Not open for further replies.

jcrchristy

Technical User
Mar 3, 2004
6
IN
I have developed a vb application and being used by 3 users now the user wants the application to shut down the PC when he comes out of the application. How can I do it?
Please help
 
Hi,

Using the Windows API you can call either the ExitWindow(...) or ExitWindowEx(...) functions depending on your needs.

HTH




William
Software Engineer
ICQ No. 56047340
 
Thani U william, can u explain with some examples...of how to use api's
 
It's as simple as :

ExitWindowsEx(mode, reason)

Once you've included the relevant declare statements in your application.



William
Software Engineer
ICQ No. 56047340
 
Genuinely just out of interest, why does the customer want it to shut down windows when you leave your app?

 
Thank U I got it.

mmilan -- The user should use the PC only for this application, so it should autamatically load the app and shutdown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top