There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijack hijackthis internet internet explorer itunes laptop malware motherboard mouse network networking ntfs outlook 2007 power printer problem ram router screen slow sound trojan usb virus vista vista 32-bit windows windows xp winxp wireless wmp
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB Timer Greater Than 65 Seconds


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
harryman's Avatar
Member with 30 posts.
 
Join Date: Aug 2003
Location: Ca.
16-May-2004, 06:26 AM #1
VB Timer Greater Than 65 Seconds
In VB, the timer option only lets you go up to 65000 milliseconds or 65 seconds. How do you make it go up more?
Aftab's Avatar
Member with 62 posts.
 
Join Date: Oct 2003
16-May-2004, 08:10 PM #2
VB Timer control
You need to do a work around to get the timer control to execute code at an interval greater than 65 seconds. You need to set the interval to 60000ms (1 minute) and have a variable which keeps track of how many times the Timer event has fired. For example, if you wanted to execute a piece of code every 2 minutes, you would do the following:

Private Sub Timer1_Timer()
Static intMinutes As Integer

intMinutes = intMinutes + 1

If intMinutes = 2 Then
Dosomething()
intMinutes = 0
End If

End Sub

All you need to change in the above code is the number of minutes for the interval. Hope this helps.
harryman's Avatar
Member with 30 posts.
 
Join Date: Aug 2003
Location: Ca.
16-May-2004, 08:18 PM #3
Perfecto. Thanks!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:16 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.