Stefano Palmeri schrieb:
> Il mercoledì 10 dicembre 2008 10:52:24 Rolf-Werner Eilert ha scritto:
>> Hello experts!
>>
>> Can I use a Timer control in a scripted Gambas program, and if yes, how?
>> And if not, is it possible in a non-graphical Gambas program?
>>
>> Thanks for any hints.
>>
>> Rolf
>>
> 
> Don't know about scripted Gambas program, but for a shell 
> program you cloud do:
> 
> -----------------------------------------------------------------------------
>  ' Gambas module file
> 
> PUBLIC hConsoleTimer AS Timer 
> 
> PUBLIC SUB Main()
>     
>   hConsoleTimer = NEW Timer AS "MyTimer"
>   hConsoleTimer.Delay = 1000
>   hConsoleTimer.Enabled = TRUE
>   
> END
> 
> PUBLIC SUB MyTimer_Timer()
>   
>   PRINT "Hello Gambas" 
>   
> END
> ---------------------------------------------------------------
> 
> Bye,
> 
> Stefano
> 
> 


A scripted program seems to be one big SUB or FUNCTION, so I got errors 
until I changed everything into one big single code without calling any 
SUBs or FUNCTIONs. This runs good. Without a timer, of course.

Thanks for your example. This might be a solution, and this gives me 
another idea, I'll be back later :-)

Rolf


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to