文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 工程科技 > 建筑/土木 > C#创建windows服务
侵权投诉

C#创建windows服务

C#创建windows服务

installutil /u CareEye.exe

安装完后能过系统的服务管理器你就可以看到你的服务了,只要点击启动就可以把它启动,把时间向前改一个小时它就会提醒你需要休息了,呵呵,够简单了吧。

代码如下:

using System;

using System.Collections;

using System.ComponentModel;

using System.Data;

using System.Diagnostics;

using System.ServiceProcess;

using System.Threading;

using System.Windows.Forms;

namespace CareEye

{

public class CareEye : System.ServiceProcess.ServiceBase

{

private Thread MainThread;

/// <summary>

/// 必需的设计器变量。

/// </summary>

private System.ComponentModel.Container components = null;

public CareEye()

{

// 该调用是 Windows.Forms 组件设计器所必需的。

InitializeComponent();

// TODO: 在 InitComponent 调用后添加任何初始化

MainThread=new Thread(new ThreadStart(ThreadFunc));

MainThread.Priority=ThreadPriority.Lowest;

}

// 进程的主入口点

static void Main()

{

//System.ServiceProcess.ServiceBase[] ServicesToRun;

// 同一进程中可以运行多个用户服务。若要将

//另一个服务添加到此进程,请更改下行

// 以创建另一个服务对象。例如,

上一页第3页

你可能喜欢

热门文档

相关文档

  • C#创建windows服务组件

    C#创建windows服务组件_IT/计算机_专业资料。创建 windows 服务组件: 组件) (注:timer 使用 system.timers.timer,不能使用 winform timer 组件) , Windows 服务...

  • 用c#创建windows服务

    c创建windows 服务 6页 7下载券 C#创建windows服务 4页 免费 创建Windows服务...右击你的服务选择启动就可以启动你的服务了 在每次需要修改Windows服务时,这就会...

  • 用Visual C#创建Windows服务程序

    用Visual C#创建Wi...用Visual C#创建 Windows 服务程序 服务介绍: 一.Windows 服务介绍: Windows ...

  • C#创建Windows服务

    c创建windows 服务 6页 20财富值 C#创建windows服务 4页 免费 创建Windows...用Visual C# 创建Windows服务不是一件困难的事,本文就将指导你一步一步创建一...

  • C#创建windows服务图解

    C#创建windows服务图解_IT/计算机_专业资料。这是我个人经验所写,详细的图文...我项目采用的是 .net 2.0,故路径为 C:\WINDOWS\Microsoft.NET\Framework\v2...

  • 用C#创建Windows Service

    用C#创建Windows Service 示例用C#创建 Windows Service 现在的...

  • C#创建windows服务

    C#创建 Windows 服务一、创建 Windows Service 1)创建 windows 服务项目 图 1...("C:\\test.txt")) { sw.WriteLine("服务停止于:" + System.DateTime....

  • 用C#创建Windows Service (2)

    用C#创建Windows Service (2)_IT/计算机_专业资料。详细介绍了C#语言怎么创建...C:\>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 也不 'C:\WINDOWS\...

  • C#创建Windows服务详细介绍

    关键词:C#创建Windows服务详 同系列文档 朝鲜历届领导人资料 朝鲜现状 为什么南北朝鲜会分裂 朝鲜的近代史1/2 相关文档推荐 c创建windows 服务 6页 20财富值 ...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email