终止(取消)PC关机程序 [英] Killing (Cancelling) the Turnoff procedure of the PC

查看:65
本文介绍了终止(取消)PC关机程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想要一个程序来计算计算机的工作时间.因此,我需要在表单上显示持续时间,并推迟关闭过程,直到用户单击表单上提供的按钮.因此,我有两个问题,我在上一个问题中问了第一个,现在第二个问题是如何将关闭过程延迟到用户单击按钮之前.我想我应该取消关闭程序,我的意思是要以某种方式取消它,并且在显示表单之后,当用户单击按钮时,我应该通过代码关闭PC.因此,如果该建议听起来正确,我应该修改我的问题,并问一个人如何杀死关闭程序.你能让我怎样完成它吗?

非常感谢您

Hello,

I want to have a program calculating how long the computer was working. So I need to show the duration on a form and postpone the turnoff procedure until the user click a button provided on the form. So I have two problems that I asked the first one in previous question and now the second one is how to delay turnoff procedure until the user click a button. I think I should kill the turnoff procedure, I mean to cancel it somehow and after showing the form and when the user click the button I should turn off the PC by code. So if the suggestion sounds right, I should modify my question and ask how one can kill the turnoff procedure. Could you please let me how I can get it done?

Thank you very much

推荐答案



这是一个应该对您有帮助的链接:

http://msdn.microsoft.com/zh-cn/library/microsoft.win32.systemevents.sessionending%28v = VS.80%29.aspx [
Hi,

here is a link that should help you:

http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.sessionending%28v=VS.80%29.aspx[^]


这篇关于终止(取消)PC关机程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆