Click here to Skip to main content
15,892,737 members
Home / Discussions / C#
   

C#

 
Generalhey all have a question about edit boxes.... Pin
tom_dx16-Jul-05 8:15
tom_dx16-Jul-05 8:15 
GeneralRe: hey all have a question about edit boxes.... Pin
Lord Kixdemp16-Jul-05 8:16
Lord Kixdemp16-Jul-05 8:16 
GeneralRe: hey all have a question about edit boxes.... Pin
S. Senthil Kumar16-Jul-05 9:10
S. Senthil Kumar16-Jul-05 9:10 
GeneralRe: hey all have a question about edit boxes.... Pin
tom_dx17-Jul-05 9:15
tom_dx17-Jul-05 9:15 
Generalreading the color of pixel Pin
Amir Jalaly16-Jul-05 6:10
Amir Jalaly16-Jul-05 6:10 
GeneralService Install Error Pin
MeshMesh16-Jul-05 3:18
MeshMesh16-Jul-05 3:18 
GeneralRe: Service Install Error Pin
Dave Kreskowiak16-Jul-05 6:42
mveDave Kreskowiak16-Jul-05 6:42 
GeneralRe: Service Install Error Pin
Anonymous16-Jul-05 21:53
Anonymous16-Jul-05 21:53 
ok here is the code
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Configuration.Install;

namespace first_service
{
///
/// This is the class for my Service
///

public class MyService : System.ServiceProcess.ServiceBase
{
public MyService()
{
InitializeComponents();

// TODO: Add any further initialization code

this.CanStop = true;
this.CanPauseAndContinue = true;

}

private void InitializeComponents()
{
this.ServiceName = "MyService";
}

///
/// This method starts the service.
///

public static void Main()
{
System.ServiceProcess.ServiceBase.Run(new System.ServiceProcess.ServiceBase[] {
new MyService() // To run more than one service you have to add them here
});
}

///
/// Clean up any resources being used.
///

protected override void Dispose(bool disposing)
{
// TODO: Add cleanup code here (if required)
base.Dispose(disposing);
}

///
/// Start this service.
///

protected override void OnStart(string[] args)
{
// TODO: Add start code here (if required)
// to start your service.
}

///
/// Stop this service.
///

protected override void OnStop()
{
// TODO: Add tear-down code here (if required)
// to stop your service.
}
}
}

[RunInstaller(true)]
public class ProjectInstaller : Installer
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
spi.Password = "toto";
spi.Username = "mesh";
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "Hello Service Template";
si.StartType = ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] {spi, si});
}
}
GeneralInteractive Windows Service Pin
MeshMesh16-Jul-05 2:09
MeshMesh16-Jul-05 2:09 
GeneralData Grid boolen colume Pin
webhay16-Jul-05 1:26
webhay16-Jul-05 1:26 
GeneralCreating a bool random value Pin
Blue_Skye16-Jul-05 0:57
Blue_Skye16-Jul-05 0:57 
GeneralRe: Creating a bool random value Pin
S. Senthil Kumar16-Jul-05 9:13
S. Senthil Kumar16-Jul-05 9:13 
GeneralRe: Creating a bool random value Pin
Blue_Skye16-Jul-05 10:41
Blue_Skye16-Jul-05 10:41 
GeneralMath.Round function in VS.NET and round function in SQL Server 2000 Pin
Blue_Skye16-Jul-05 0:53
Blue_Skye16-Jul-05 0:53 
GeneralRe: Math.Round function in VS.NET and round function in SQL Server 2000 Pin
Rob Graham16-Jul-05 8:38
Rob Graham16-Jul-05 8:38 
GeneralRe: Math.Round function in VS.NET and round function in SQL Server 2000 Pin
Blue_Skye16-Jul-05 10:26
Blue_Skye16-Jul-05 10:26 
QuestionRemote Object with Singleton mode ?? Pin
Tee+16-Jul-05 0:26
Tee+16-Jul-05 0:26 
AnswerRe: Remote Object with Singleton mode ?? Pin
S. Senthil Kumar16-Jul-05 9:24
S. Senthil Kumar16-Jul-05 9:24 
Generalei need help Pin
Member 145978315-Jul-05 21:57
Member 145978315-Jul-05 21:57 
GeneralRe: ei need help Pin
Lord Kixdemp16-Jul-05 8:18
Lord Kixdemp16-Jul-05 8:18 
GeneralSQL SELECT statement syntax Pin
sea#15-Jul-05 21:32
sea#15-Jul-05 21:32 
GeneralRe: SQL SELECT statement syntax Pin
Dave Kreskowiak16-Jul-05 6:45
mveDave Kreskowiak16-Jul-05 6:45 
GeneralRe: SQL SELECT statement syntax Pin
sea#16-Jul-05 9:10
sea#16-Jul-05 9:10 
GeneralRe: SQL SELECT statement syntax Pin
Dave Kreskowiak16-Jul-05 15:49
mveDave Kreskowiak16-Jul-05 15:49 
GeneralRe: SQL SELECT statement syntax Pin
sea#17-Jul-05 6:02
sea#17-Jul-05 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.