Question:

Timer Problems and VB.Net?

by  |  earlier

0 LIKES UnLike

I have an aplications that need to be running at all times within this application there is a process that needs to start at a certain time. I have tried using the time with in vb.net windows forms but if I had to put the application on to check every minute the the program will use to much of the user's pc memory. The program is suppossed to be non invasive. I was wondering if there is any other way to check for times that don't affect the pc to much.

 Tags:

   Report

2 ANSWERS


  1. If you do a System.Threading.Thread.Sleep(60000)... then every minute it could check the time - that wouldn't affect the pc in any noticable way.

    Seems there is a better way though... just can't think of it off hand


  2. Public Class Form1

        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

            MEM.LABEL = USERMEM(lol^^)

        End Sub

        Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs... Handles Me.FormClosed

            Timer1.Stop()

        End Sub

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Timer1.Interval = 10000

            Timer1.Start()

        End Sub

    End Class

    Module Module1

        Sub main()

            Form1.ShowDialog()

            'Form1.Show()

        End Sub

    End Module

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.