我想在电脑闲置时调用机器上写一些文件C# [英] I want to call write some files on the machine when the pc is idle C#

查看:67
本文介绍了我想在电脑闲置时调用机器上写一些文件C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友

i尝试在电脑闲置时在机器上写一些文件

i尝试了Application.Idle但是它总是调用我已创建的方法

i尝试了任务空闲和相同的



非常感谢

Hi Friends
i try to write some files on the machine when the pc is idle
i tried Application.Idle but it always call the method i have been created
i tried Task Idle and the same

Thanks alot

推荐答案

你可以使用Application.Idle事件:

https://msdn.microsoft.com/en-us/library/system.windows.forms.application.idle%28v=vs.110%29.aspx [<一个href =https://msdn.microsoft.com/en-us/library/system.windows.forms.application.idle%28v=vs.110%29.aspx\"target =_ blanktitle =New Window > ^ ]



实际上没有什么可以使用了。如果系统太忙,你的应用程序通常不会被调用,当然也不会空闲,因为系统会切换到另一个进程而不是信号空闲。



祝你好运!
You can use the Application.Idle event for that:
https://msdn.microsoft.com/en-us/library/system.windows.forms.application.idle%28v=vs.110%29.aspx[^]

There is really not much else to use. If the system would be too busy your application won't be called that often and certainly isn't idle because the system would switch to another process instead of signal idle.

Good luck!


这篇关于我想在电脑闲置时调用机器上写一些文件C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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