[Gambas-user] Timer in console projects - help the stupid, please
Stefano Palmeri
rospolosco at ...152...
Thu Jan 25 19:00:59 CET 2007
Alle 18:45, giovedì 25 gennaio 2007, José Luis Redrejo ha scritto:
> 2007/1/25, Stefano Palmeri <rospolosco at ...152...>:
> >
> > 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.
> >
>
> me too. That's an only console project. In fact I have it working in a
> non-graphic application, but I wrote from my bad memory and forgot to add ""
> in the code. The declaration should be like this:
> hDaemonTimer = NEW Timer as "Timer1"
> -------------------------------------------------------------------------
OK! It works now. I'm definitively stupid!
Should I run for President and making a crazy war?
Thanks,
Stefano Palmeri
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list