[Gambas-user] Timer in console projects - help the stupid, please

Benoit Minisini gambas at ...1...
Thu Jan 25 19:26:44 CET 2007


On Thursday 25 January 2007 18:30, Stefano Palmeri wrote:
> Alle 18:10, giovedì 25 gennaio 2007, José Luis Redrejo ha scritto:
> > It should be:
> >
> > PUBLIC hDaemonTimer AS Timer
> >
> > PUBLIC SUB Main()
> >
> >   hDaemonTimer = NEW Timer as Timer1
> >   hDaemonTimer.Delay = 1000
> >   hDaemonTimer.Enabled = TRUE
> >
> > END
> >
> > PUBLIC SUB Timer1_Timer()
> >
> >   PRINT "hello world!"
> >
> > END
> >
> >
> > ANytime you declare a new object that raises events, you shoud use the
> > syntax:
> > object=New Class as "whatever"
> > and the events are received at whatever_event subs.
> >
> > Regards.
>
> Sorry, your code doesn't work.
> I'm talking about a *only console* project.
>
> Who's next?
>
> Regards,
>
> Stefano Palmeri
>

hDaemonTimer = NEW Timer AS "Timer1"

Read the doc at http://gambasdoc.org/help/lang/new

Regards,

-- 
Benoit Minisini




More information about the User mailing list