You probably have to set the Interval value too.
I have the same problem.
Working in C++, my InitializeComponent() has
this->ServiceTimer->Enabled = true;
this->ServiceTimer->Interval = 1000;
this->ServiceTimer->Tick += gcnew System::EventHandler(this,
&EMuxServiceWinService::ServiceTimer_Tick);
My OnStart() has
ServiceTimer->Start();
and my OnStop() has
ServiceTimer->Stop();
My OnStart, OnStop, and ServiceTimer_Tick all have code to write to a
log file. The OnStart and OnStart logs get written but the timer tick
log never does.
I confess to being a complete newbie at DotNet code, although I am
rather experienced at MFC and Windows32 programming in general, so I
might be missing something. But what could it be?
Note: I have also tried putting the timer enable and interval set in
OnStart.