本文介绍了10分钟不活动应用程序关闭C#winform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的问题很简单,我创建了一个程序,但是当有10分钟不活动时,应用程序将关闭,如下所示:

 Application.Close(); 





我已经搜索了鼠标移动事件并出现了一些错误,在我的Form1.Designer.cs中出现错误:

  this  .MouseMove + =  new  System.Windows.Forms.MouseEventHandler( this  .Form1_MouseMove); 



错误说:

无法分配给'MouseMove',因为它是'方法组'



问候,

KZ

解决方案



Hi,

My question is simple, I have created a program, but when there has been 10 minutes of inactivity, the application will Close, like this:

Application.Close();



I already search about Mouse Move event and there come some errors, in my Form1.Designer.cs is an error in this line:

this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);


The error says:

Cannot assign to 'MouseMove' because it is a 'method group'


Regards,
KZ

解决方案



这篇关于10分钟不活动应用程序关闭C#winform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 07:29