This is my code
protected override void OnStart(string[] args)
{
timAutoUpdate.Enabled = true;
MessageBox.Show("started");
}
protected override void OnStop()
{
timAutoUpdate.Enabled = false;
System.Windows.Forms.MessageBox.Show("Service stopped");
}
private void timAutoUpdate_Tick(object sender, EventArgs e)
{
MessageBox.Show("Ticked");
}
Its showing message "Ticked" after starting event.If i delete messagebox in Onstart event then Tick event is not working.Its not showing any message.Please specify the reason behind it.I just kept simple message box in Tick event instead of my code.Please tell me the way to achieve it.
protected override void OnStart(string[] args)
{
timAutoUpdate.Enabled = true;
}
protected override void OnStop()
{
timAutoUpdate.Enabled = false;
}
private void timAutoUpdate_Tick(object sender, EventArgs e)
{
MessageBox.Show("Ticked");
}