Not sure what your looking for but here is one example I have....
On a form I created sort of a custom progress bar... So I added a bunch of colorfull bars using the shape control. So I had like Shape(0) to Shape(39) and set the visible property to FALSE.
Then added a TIMER CONTROL to the form. I set the INTERVAL of the timer to 2000. Remember that is in milliseconds...
Next added the code to the time...
Private Sub Timer1_Timer()
For i = 0 To 40
If Shape1(i).Visible = False Then
Shape1(i).Visible = True
Exit Sub
End If
Next
End Sub
The timer begins counting when the form is executed. I think you can reset the counter and start at a different point by setting the counter to a new number. remember that the counter will trigger an event only when it reaches the interval number.
Well anyway, just put that together really fast as an example... I am sure the expert users of this site have other examples...
Is there a way or is it even possible to use the timer control or some other control to get it to refresh the vb abpplication or at least requery the databases every 5 minutes?
thanks
I am not sure what you mean by refresh a vb application? As for a query, I would think it is possible, sure. You would just want to put your query in the timer event. So every time the timer event fires, your query is re executed.
However, I don't think the timer control counts past about one(1) minute. Check out msdn and search for more info on this.... Here is one link:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.