E文好的话,看下面这个链接。
http://www.vbrad.com/pf.asp?p=source/tip_service_vb.htm
若打不开,看下面这个链接,然后找Easiest way to create an NT Service with a VB app
http://www.programmersheaven.com/zone1/latestarticleszone.htm
另外我知道有一个API函数RegisterServiceProcess,可以将程序注册为服务进程。但好象这个API只能把已经运行的进程注册为服务进程。
以下为VB申明
Function RegisterServiceProcess Lib "kernel32" (ByVal ProcessID As Long, ByVal ServiceFlags As Long) As Long
以下为PB申明
function long RegisterServiceProcess ( long dwProcessID, long dwtype ) library "kernel32"