|
-
Feb 19th, 2001, 02:04 PM
#1
Thread Starter
New Member
Hi,
I'm creating a DLL that's going to be called from IIS. The DLL going to check to an Access database if there is new entry. If so its going to update another page.
I want a Timer that's call the Update function every ex: 5 min. (5000)
I try something like this:
(General Statement)
Dim timer1 as Timer
Private Sub Class_Initialize()
timerInterval.Interval = 5000
timerInterval.Enabled = True
End Sub
Sub Timer1_Timer()
Call Update
End Sub
Sub Update()
..... Code ....
End sub
Nothing seem to happen, where img doing wrong?
Thx
-
Feb 20th, 2001, 10:47 AM
#2
Fanatic Member
WithEvents
I think you need to declare 'timer1' with events like this:
Dim WithEvents timer1 AS Timer
-
Feb 20th, 2001, 02:15 PM
#3
Thread Starter
New Member
Oh yeah! Thx
I didnt played with event too much, but now i know
Thx again.
-
Feb 23rd, 2001, 05:45 AM
#4
New Member
Leef de call
Just leef de call away
You only need the naam of the sub or function
Sub Timer1_Timer()
Update
End Sub
Sub Update()
..... Code ....
End sub
Like This, maybe it wil be ok
greatings from Wald
-
Mar 4th, 2001, 12:41 PM
#5
Addicted Member
This may seem like a stupid question, but here goes...
How do you set the timer1 object to a new timer? I can dim as timer, but not as new timer. If you use createobject, what goes in the quotes, or what dll must be referenced to do this?
Thanks.
That which does not kill us, only makes us stronger. 
-
Mar 5th, 2001, 06:34 AM
#6
Fanatic Member
NEW keyword
If you don't see the Timer object in the object browser list after typing the NEW keyword, you can't instantiate it by any means. It is not 'creatable'.
Why do you need a new Timer object anyway? More than one timer will all have the same value anyway.
-
Mar 5th, 2001, 02:07 PM
#7
Addicted Member
I wanted to create a timer in code, in an ActiveX exe. I didnt want to have to put a form in the project and just use it for the timer event.
The Settimer API won't work on NT (for me, anyway).
If you have any suggestions about the best way to do this, I an very eager to hear them.
Thanks.
That which does not kill us, only makes us stronger. 
-
Mar 6th, 2001, 05:22 AM
#8
Fanatic Member
Why New?
I still don't understand why you need a 'new' timer object.
Just use the timer object without instantiating it.
-
Mar 6th, 2001, 02:31 PM
#9
Addicted Member
Could you post some code showing how to set the properties and recieve a timer event in a project that doesnt have a form? This may seem like a stupid question, but I am having trouble setting the properties from an object I can't instanciate. For Instance...
(This is what im trying)
Dim tm as timer
or
dim withevents tm as timer
tm.interval=1000 or tm.enabled=true
The last line blows up because the object isnt set. An since I dont have a timer on a form to actually set the interval and enabled properties I am at a loss. I'm sure there must be an easy way to do this, but I dont know it. Thanks for your help!!!
That which does not kill us, only makes us stronger. 
-
Mar 7th, 2001, 12:23 PM
#10
Addicted Member
That which does not kill us, only makes us stronger. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|