473,686 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying Shut Down dialog

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

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 2329
Add a reference to system directory\shell 32.dll
Add the following code:

Shell32.ShellCl ass c = new Shell32.ShellCl ass();
c.ShutdownWindo ws();

I tested this and it worked on Win2K pro.


Dec 2 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Claire | last post by:
Running XP pro, SP2. Visual studio .NET 2003. App written in C# I have written an application that hides itself when run and shows a notification icon in the system tray. If the main form is visible/restored to the desktop, and I tell windows to restart, windows shuts down fine. If the main form is minimized to the tray and I tell windows to restart, other desktop apps close down fine but my program's icon remains sat in the system...
by: Diogo Alves - Software Developer | last post by:
Hi, I have a application developed by me in C# that does not let windows shut down! What is the problem? is this a Framework bug? I would like to receive some feedback about this issue
by: Anders Both | last post by:
If no pages in my asp.net web-system, is being requested for some periode, it seems like the asp.net process is shut down automaticaly. Is this a normal behavior, or does my system contains some kind of bug or wrong configuration ? I don´t want my asp.net process to ever shut down, because I want to keep data, object etc, in ram. I hope someone can give me good advices.
by: Matt | last post by:
When I tried to close VS.NET, it has the following error dialog: "Microsoft Development Environment cannot shut down because a modal dialog is active. Close the active dialog and try again." But I couldn't see any modal dialog, and eventually I kill the process to close VS.NET any ideas??
by: Jeff S | last post by:
I'm creating a new Windows Forms MDI application... How can I add cause the application to shut itself down after a period of ? I did this in an old COM/VB6 application and I had to have code behind practically all visible UI controls (triggered on the Mouse_Move event) that reset a global variable monitored by a timer. If the global value incremented past a certain point, then a Timer event procedure would cause a dialog to appear....
by: Austen | last post by:
Hello i trying to shut down window using vb. i able to restart and log off, but was unable to shut down. when excute the shut down command , nothing happend. it related to window os security issue?
by: ArkJ | last post by:
Hello. I have a little problem. I created a little Service which uses SIP, all works rather well, but when I want to shut it down in the Services panel, it looks as if it's shut down, but in fact it's not: - when I try want to delete the .DLL file, I can't: the file is still locked - if I "Start" my Service again, it refuses I have to wait like ~20s, and then it is really shut down. When I shut down the Service, and then try to Start it...
by: sashi | last post by:
Shut down Windows For various reasons you may require a shut down of Windows to happen programmatically. For instance if the installation of your program requires system reconfiguration. The following code will do this for you with options to Reboot, etc. 'Module code - modShutdown ' Shutdown Flags Const EWX_LOGOFF = 0 Const EWX_SHUTDOWN = 1
by: TC | last post by:
I'm confused about the proper way to shut down my application. I have a form which instantiates a control, which instantiates another control, which instantiates yet another control that runs a time- consuming loop. I put Application.DoEvents() into the loop so the user can continue to work on the form while the loop is running. Everything works great until the user wants to exit the application. The application will not close until the...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.