|
-
October 6th, 1999, 01:29 AM
#1
Timer as object
Hi!
I would like to have a timer as an object. But I guess that since it is an activeX control I can´t create it??
This is what I had in mind:
Dim tim As Timer
Set tim = CreateObject("VB.Timer")
My project is a activeXdll. I want a timer to run somehow. How can I achive that?
Jen
-
October 6th, 1999, 01:45 AM
#2
Re: Timer as object
this a sample for using a Timer:
Dim x as Variant
x = Timer
MsgBox x
Dim y as Variant
y = Timer
MsgBox y - x
it is used for calculating the elapsed time between two code sections.
I gues what YOU need is a timer control.
You can place such an object on a (hidden) form and trap the "Timer" event.
You could also use the SetTimer API call.
-
October 6th, 1999, 02:08 AM
#3
Re: Timer as object
try this out !!
add a form Form1 to the project (although you dont need to show it)
add a timer control to the form
then you can create :
dim t as new form1.timer1
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
|