curiouswebster
asked on
Need a timer on VB6
I have a function debugged and working. Now I need to call it every 5 (or so) seconds.
Could someone please show me the code I need for this? If will run 24/7, so please consider robustness, etc.
It's VB 6.0.
thanks,
newbieweb
Could someone please show me the code I need for this? If will run 24/7, so please consider robustness, etc.
It's VB 6.0.
thanks,
newbieweb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm pretty new to VB.
Do I define Timer1 somewhere?
I see that "Me" is known by the environment, but not Timer1.
Do I define Timer1 somewhere?
I see that "Me" is known by the environment, but not Timer1.
From the tool box select the timer control and then drop it on your form
The timer control is the one with a clock icon
Click on it. The cursor changes to a cross... then draw a squaere on your form. That drops the timer on your form
The timer control is the one with a clock icon
Click on it. The cursor changes to a cross... then draw a squaere on your form. That drops the timer on your form
If you do not see the toolbox (to your left) then click on the View menu of VB6 and from the drop down menu click toolbox. You may also hit Alt+vx sortcut for the toolbox to appear
ASKER
How do I switch to the form layout window?
ASKER
I got it. Thanks.
ASKER
The Load() function is not getting called.
Do I need to do more than just create the code for it?
Do I need to do more than just create the code for it?
ASKER
It works just like Visual Studio C#.
I double clicked the Form and it got created.
Thanks
I double clicked the Form and it got created.
Thanks
Private Sub Timer1_Timer()
Me.Timer1.Enabled = False
Call YourFunction
Me.Timer1.Enabled = True
End Sub