aewarnick Posted April 22, 2003 Posted April 22, 2003 Something that runs in the sys tray and something that does not? Quote C#
Moderators Robby Posted April 22, 2003 Moderators Posted April 22, 2003 Can you explain. Quote Visit...Bassic Software
aewarnick Posted April 22, 2003 Author Posted April 22, 2003 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? Quote C#
aewarnick Posted April 22, 2003 Author Posted April 22, 2003 (edited) 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. Edited April 22, 2003 by aewarnick Quote C#
*Experts* jfackler Posted April 23, 2003 *Experts* Posted April 23, 2003 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. Quote
Guest mutant Posted April 23, 2003 Posted April 23, 2003 If you still want to create it, i will give you a template that the wizard creates for service: :) 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 Quote
aewarnick Posted April 23, 2003 Author Posted April 23, 2003 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. Quote C#
Guest mutant Posted April 23, 2003 Posted April 23, 2003 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. Quote
aewarnick Posted April 23, 2003 Author Posted April 23, 2003 I never enter a user name and password when I reboot. Does that mean that I am not logged on? Quote C#
Guest mutant Posted April 23, 2003 Posted April 23, 2003 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. Quote
aewarnick Posted April 23, 2003 Author Posted April 23, 2003 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. Quote C#
Leaders Banjo Posted April 30, 2003 Leaders Posted April 30, 2003 Win98 will not run services. And mutant, it is possible to set a machine to automatically log on. Quote Those who live by the sword get shot by those who don't!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.