如何让按钮在延迟时间内运行很多应用程序? [英] How to make button run a lot of application with delay time ?
本文介绍了如何让按钮在延迟时间内运行很多应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想让按钮运行很多应用程序.exe有延迟时间请帮助
我尝试过:
i want to make button run a lot of application .exe with delay time please help
What I have tried:
Private Sub RButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RButton1.Click
Process.Start(My.Computer.FileSystem.CurrentDirectory & "\dbsrv\admin.txt")
Process.Start(My.Computer.FileSystem.CurrentDirectory & "\dbsrv\Omar.txt")
End Sub
推荐答案
由于您的按钮点击需要很长时间,我建议您使用工作线程来实现此目的。插入对 Thread.Sleep 的调用[ ^ ]方法以延迟调用。
Since your button click would then take a long time, I suggest you to use a worker thread for the purpose. Insert calls to the Thread.Sleep[^] method in order to delay the calls.
这篇关于如何让按钮在延迟时间内运行很多应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文