R
Rico
Hello,
I'm trying run a process at regular intervals using a windows service. the
problem is, the timer_tick event doesn't appear to be working. I've written
the following code as a test;
Public Class FileName
Protected Overrides Sub OnStart(ByVal args() As String)
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If Not EventLog.SourceExists("Service1") Then
EventLog.CreateEventSource("Service1", "Application")
End If
EventLog1.Source = "Service1"
EventLog1.WriteEntry("This is a simple event log entry")
End Sub
Needless to say, there are no EventLog entries occurring. I've also tried
to attach to the process but again, it doesn't seem to fire.
Any direction would be greatly appreciated.
Thanks!
Rick
I'm trying run a process at regular intervals using a windows service. the
problem is, the timer_tick event doesn't appear to be working. I've written
the following code as a test;
Public Class FileName
Protected Overrides Sub OnStart(ByVal args() As String)
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If Not EventLog.SourceExists("Service1") Then
EventLog.CreateEventSource("Service1", "Application")
End If
EventLog1.Source = "Service1"
EventLog1.WriteEntry("This is a simple event log entry")
End Sub
Needless to say, there are no EventLog entries occurring. I've also tried
to attach to the process but again, it doesn't seem to fire.
Any direction would be greatly appreciated.
Thanks!
Rick