首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

(C#)Windows Forms Service 创设,使用,跟踪

2012-09-08 
(C#)Windows Forms Service 创建,使用,跟踪今天综合网上的一些信息,成功创建Windows服务,并在机器上运行成

(C#)Windows Forms Service 创建,使用,跟踪

今天综合网上的一些信息,成功创建Windows服务,并在机器上运行成功,下面讲述以下操作步骤。

1.创建解决方案,本程序在VS2010开发工具下演示。

(C#)Windows Forms Service 创设,使用,跟踪

2.创建完成后,你会发现在解决方案中存在如下图的文件。

(C#)Windows Forms Service 创设,使用,跟踪

此文件用于存放你想要的操作。

3.具体代码如下。

(C#)Windows Forms Service 创设,使用,跟踪

很简单的代码,每隔一秒在文本中显示一次当前时间

4.在设计界面

 

(C#)Windows Forms Service 创设,使用,跟踪

5.(C#)Windows Forms Service 创设,使用,跟踪

6.(C#)Windows Forms Service 创设,使用,跟踪

这个名称是你的服务名称。

(C#)Windows Forms Service 创设,使用,跟踪

7.服务完成后,必须安装服务。

找到VS自带的命令工具

(C#)Windows Forms Service 创设,使用,跟踪

(C#)Windows Forms Service 创设,使用,跟踪

8.安装命令

(C#)Windows Forms Service 创设,使用,跟踪

9.查看服务是否存在

(C#)Windows Forms Service 创设,使用,跟踪

10.启动服务

(C#)Windows Forms Service 创设,使用,跟踪

好了,在相应的盘符下已经存在文件。

 

详细文章请结合http://www.cnblogs.com/tuyile006/archive/2006/11/27/573654.html

                            http://www.csharpwin.com/csharpspace/5575r154.shtml 

热点排行