Discussion:
VB6 Timer with out form
(too old to reply)
surya
2006-08-18 12:35:09 UTC
Permalink
hi can i have a code like this



Dim mytimer As Timer

Public Sub Main()
mytimer .Interval = 10
End Sub


Private Sub mytimer _Timer()
msgBox "Timer Event"
End Sub

-- I am Getting Error Message " Object Variable or with Block Variable
is not set"
While Setting
mytimer .Interval = 10
in main.

-- I don't have any form in my project
Sneha Menon
2006-08-18 14:33:36 UTC
Permalink
Post by surya
hi can i have a code like this
-- I don't have any form in my project
------------------Sneha------------------------------
Hi Surya

Why cant you have a form? Make it Invisible!

Sneha
-----------------------------------------------------------
surya
2006-08-21 06:57:14 UTC
Permalink
Post by Sneha Menon
Post by surya
hi can i have a code like this
-- I don't have any form in my project
------------------Sneha------------------------------
Hi Surya
Why cant you have a form? Make it Invisible!
Sneha
-----------------------------------------------------------
hi sneha , thanks for u r replay ....

but i wanted to know whether VB6 supports such kind of using
objects of controls in our applications or not ..

some where in the middle of my application ( in some class
module) . i need a timer contrl to poll the state of the XMLHttpRequest
... with some intervall of time ..

in this case calling form's timer object and doing things over
there is some extra stuff ,, isn't it?
Randy Birch
2006-08-21 22:12:04 UTC
Permalink
No. If you need a timer in a module you can either get the free CCRP hi-res
timer DLL, or implement the SetTimer API with your own callback. The CCRP
site is http://ccrp.mvps.org; the how-to on using the timer can be seen at
http://vbnet.mvps.org/code/forms/flashwindowsettimer.htm.
--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.
Post by Sneha Menon
Post by surya
hi can i have a code like this
-- I don't have any form in my project
------------------Sneha------------------------------
Hi Surya
Why cant you have a form? Make it Invisible!
Sneha
-----------------------------------------------------------
hi sneha , thanks for u r replay ....

but i wanted to know whether VB6 supports such kind of using
objects of controls in our applications or not ..

some where in the middle of my application ( in some class
module) . i need a timer contrl to poll the state of the XMLHttpRequest
... with some intervall of time ..

in this case calling form's timer object and doing things over
there is some extra stuff ,, isn't it?
Loading...