Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

On Timer Event within a Thread

1 view
Skip to first unread message

Roger de Valle

unread,
Mar 19, 1997, 3:00:00 AM3/19/97
to

I would be thankfull if someone could give me some help in the area of
getting an OnTimer event working within a thread.

I have several threads running succesfully within a program and moved
onto setting up a final one. In this thread I have created a Timer
component, plus several other non visual components. From the latter
ones, one of which is a TAPI interface I know the components are running
fine.

However I have run into a real problem of defining the TNotifyEvent. I
cannot get any of the events such as OnTimer to run, I thought my
technique was correct but obviously not, I have tried about 10 hours of
permuations and combinations to no avial.

If possible, if anyone has done a simple thread, created a timer and got
the OnTimer event working within the thread I would like to see a snippet
of the code.

I can get the whole timer thing running by placing the Timer onto the
main form and defining the OnTimer event in the main form code and
accessing it from the thread.

Regards.

Roger de Valle.

Ray Lischner

unread,
Mar 19, 1997, 3:00:00 AM3/19/97
to

On Wed, 19 Mar 1997 20:32:13 +1100, rdev...@netlink.com.au (Roger de
Valle) wrote:

>I would be thankfull if someone could give me some help in the area of
>getting an OnTimer event working within a thread.

You need a message handling loop in the thread. Try copying the
relevant code from TApplication.Run.
--
Ray Lischner, Tempest Software, Inc., Corvallis, Oregon, USA
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

0 new messages