您可以参考以下文章学习如何在Visaul Studio.NET中创建一个Windows后台服务程序:
Visual Basic and Visual C# Concepts Walkthrough: Creating a Windows Service Application in the Component Designer
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkWalkthroughCreatingWindowsServiceApplication.asp