如何使用C#winform在特定时间打开新表单 [英] How to open new form in especific time using C# winform
本文介绍了如何使用C#winform在特定时间打开新表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在特定时间内自动在项目中打开现有表单。
例如:当时间达到10:00和10.05时,表格应该打开2次。
PLZ帮助任何人......
我尝试过的事情:
............... .. ....................................................................................。
I want to open existing form within my project automatically in specific time.
for example : form should be open 2 times when time gets 10:00 and 10.05.
plz help any one....
What I have tried:
……………..………………………………………………………………………….
推荐答案
您需要提供有关您要完成的更多细节。
例如,您是否总是想要某种形式是开放的,然后在这两个特定的时间打开一个新的表格?如果这是问题,那么您只是询问如何管理计时器来创建和显示表单:
计时器类(System.Timers)| Microsoft Docs [ ^ ]
或者,您是否只选择一种形式,这种形式大多是隐藏的,除非它在这几次突然出现?如果这是问题,那么您可能正在寻找一个NotifyIcon
应用程序与计时器相结合。请参阅:
以正确的方式执行NotifyIcon计划 [ ^ ]
或者,您希望您的应用程序大部分时间都不运行吗?如果这是你的问题,那么你可能会询问Windows任务调度程序:
任务计划程序| Microsoft Docs [ ^ ]
如果您更新问题以提供更多详细信息,则您更有可能获得具体答案。目前的情况是,所有人都可以提供一些广义的建议。
You need to provide more detail about what you are trying to accomplish.
For example, would you always want some form to be open and then simply open a new form at those two specific times? If this is the question, then you're simply asking how to manage a timer to create and display your forms:
Timer Class (System.Timers) | Microsoft Docs[^]
Or, would you prefer only one form, which is mostly hidden, except when it pops up at those couple of times? If this is the question, then you're probably looking for aNotifyIcon
application combined with a timer. See:
Doing a NotifyIcon program the right way[^]
Or, would you prefer that your application isn't even running most of the time? If this is your question, then your probably asking about Windows task scheduler:
Task Scheduler | Microsoft Docs[^]
If you update your question to provide more detail, you are more likely to get a specific answer to it. As it currently stands, all anyone can do is provide some generalized advice.
这篇关于如何使用C#winform在特定时间打开新表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文