borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (use a animated mouse for form in VB6)Next Topic (Third Challenge) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Timer
Poster Message
pillsbury
Level: Protégé

Registered: 22-08-2005
Posts: 8

icon Timer

Could someone please show me how to code a timer with no limits..

For example Timer1.Interval = Text4.Text

When I type a value greater than 50000 in the text box I get a run time error..

Also how do I replace the icon on the from with text..

Thanks..

15-09-2005 at 07:31 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Timer

[a form with no icon + a certain borderstyle = no icon just text... if you mean the timer control, it's only visible in design time]

Using the timer, it's limited to a integer value.

Inside the timer's fire event... to increase the value... 30,000 is 30 seconds

so... if you want something to happen in say 1 min...

inside the timer's event, you have a variable to count the number of times it's executed, if the execution count is >= the desired time, you reset the variable to 0 or 1, and execute whatever you want.

ex:

' Assuming the timer is set to 30,000
Static iCount as Integer

iCount=iCount+1

If iCount =2 then
' Commands to execute
    iCount=1
End if


____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

15-09-2005 at 07:50 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
pillsbury
Level: Protégé

Registered: 22-08-2005
Posts: 8
icon Re: Timer

Thanks for your help.. JLRodgers

21-09-2005 at 03:50 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Timer
Previous Topic (use a animated mouse for form in VB6)Next Topic (Third Challenge) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder