如何在C#中为Windows服务设置进度条? [英] How to set Progress Bar for a windows service in C#?

查看:91
本文介绍了如何在C#中为Windows服务设置进度条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#中为Windows服务设置进度条?我正在使用运行按钮和通过停止按钮停止自动执行Windows服务。我想在Windows服务运行时设置进度条。我想在Windows应用程序中这样做。

How to set Progress Bar for a windows service in C#? I am automating the windows service using Run Button and Stopping via Stop Button. I want to set a progress bar when the Windows service is running. I wanrt to do so in a windows application.

推荐答案

假设你有一个Windows.Form你应该看看这里





ProgressBar类
[ ^ ]



和这里

C#中的进度栏​​ [ ^ ]



或者这里

< a href =http://www.dotnetperls.com/progressbar> http://www.dotnetperls.com/progressbar [ ^ ]
Assuming you have a Windows.Form you should have a look here


ProgressBar Class
[^]

and here
ProgressBar in C#[^]

or here
http://www.dotnetperls.com/progressbar[^]


可能会对你有帮助......



c#windows应用程序中的进度条程序 [ ^ ]
May be this will help you...

progress bar in c# windows application program[^]


服务没有UI,因此您无法执行此操作。您需要有第二个可以与服务通信的应用程序,它实际上显示了进度。
A service has no UI so you can't do it. You would need to have a second application that can communicate with the service, that actually displays the progress.


这篇关于如何在C#中为Windows服务设置进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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