• 10 years ago

    I am a very Jr. Vb.net programmer. Tongue Tied I need to figure out how to make a timer in a windows service that calls 3 procedures at set time intervals and saves them to my c drive with different name. I have made a windows application that is successful at saving my files in a XML format on a button click. But now I need to do the same process with a timer and write the new xml files over the old xml files.  I just need a little direction not your code to put me on track to solving my next step. I am confused as to if I need to know more about multithreading or the TimerCallBack. Any honest direction will be greatly appreciated. Party!!! Thanks

  • 10 years ago
    You don't need any TimerCallback delegates.  Just use a System.Timers.Timer component.  It behaves much like the System.Windows.Forms.Timer except that it's not tied to a Form.  It's a component too, so you can add it to your Toolbox and then add it to your service in the designer.  The Elapsed event of this Timer is basically the same as the Tick event of the other.  Just note that the Timers.Timer will stop after raising the Elapsed event by default.  If you want it to keep running the way a Windows.Forms.Timer does then you need to set its AutoReset property to True.
  • 10 years ago
    Great! Thanks for the info it is greatly appreciated!! Smiley Face You have a great day and thanks again!! Yes Thant’s all I needed is a point in the right direction. Big Smile

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”