How do you make a constant running process?

Sorry, when you bring up the running processes using cntl alt del you see the list of them but not all of them are in the system tray by the clock.

How would I make any program run in the background like they do in the tray and not in the tray?
 
For some reason I do not have that option in VS. I got it for 99 at staples. Do I have a lower grade version?

And, from what I have read on the net it is only for nt versions of windows. What I am talking about is a program that runs in the system tray beside the clock. Or even better would be one that has the ability to run in the tray or only be found in the running processes window.
 
Last edited:
yep,
you've got the standard version
there are work arounds to all it's limitations, but it takes some exploration and a lot of work in some cases.
 
If you still want to create it, i will give you a template that the wizard creates for service: :)

C#:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;

namespace WindowsService1
{
	public class Service1 : System.ServiceProcess.ServiceBase
	{
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Service1()
		{
			// This call is required by the Windows.Forms Component Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitComponent call
		}

		// The main entry point for the process
		static void Main()
		{
			System.ServiceProcess.ServiceBase[] ServicesToRun;
	
			// More than one user Service may run within the same process. To add
			// another service to this process, change the following line to
			// create a second service object. For example,
			//
			//   ServicesToRun = New System.ServiceProcess.ServiceBase[] {new Service1(), new MySecondUserService()};
			//
			ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() };

			System.ServiceProcess.ServiceBase.Run(ServicesToRun);
		}

		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
			this.ServiceName = "Service1";
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		/// <summary>
		/// Set things in motion so your service can do its work.
		/// </summary>
		protected override void OnStart(string[] args)
		{
			// TODO: Add code here to start your service.
		}
 
		/// <summary>
		/// Stop this service.
		/// </summary>
		protected override void OnStop()
		{
			// TODO: Add code here to perform any tear-down necessary to stop your service.
		}
	}
}

Just create a project, add class file, copy this code, and add reference to System.ServiceProcess
 
What is the advantage of using a service over using a notify icon or just hiding the window and the window icon box?

From what I read, you can only use the services for nt versions unless I read wrong.
 
I dont know if WinXP is NT :) but I could install the service on it. I could also try on Win98 but I would have to format my drive which im not planning on doing now :D .
Windows services have one BIG advantage, they run even if there is no one logged onto the computer.
 
You are, but if you dont have a prompt for user name or pass it means that you are the only user registered on that computer and you do not require password. Of course this is not the case on server or most workstation computers where there must be Administrator account which is protected by password.
 
I have win98. Could you let me try your service and see if it works? I'll pm my e-mail address to you. Please don't give it out, it is the one I want to keep ads out of.
 
Back
Top