[Gambas-user] SUB in background

Pino Zollo pinozollo at ...626...
Thu Apr 10 20:15:08 CEST 2008


Alle 07:55, giovedì 10 aprile 2008, hai scritto:
> Hi,
>
> I put a timer on my form with a maximal delay (3600) .
> Then I attach this routine : (Tmer is a global int)
>
> PUBLIC SUB Timer1_Timer()
>   TMer = TMer + 1
>   IF TMer = 20 THEN ' this to have it fire up only every 20 secs or so
>     Do_mysub()
>     TMer = 0
>   END IF
> END
>
> It works like a charm in the background.
>
> Steven
>
> Le mercredi 09 avril 2008 à 10:48 -0400, Pino Zollo a écrit :
> > Hi everybody.
> > Is there a way to call a SUB in background ?
> >
> > In my applications, from time to time the user runs a task which consists
> > in filling a file with informations contained in the database.
> >
> > This task may take for 3 to 5 minutes.
> > During this time all the windows are frozen and the user con not do
> > anything but waiting.
> >
> > During this time only th ProgressBar moves, and not continuously.
> > In a multitasking environment there should be a way to keep working while
> > a low priority task is in execution.
> >
> > Thanks
> >
> > Pino

Thanks Steven,

I understand that your SUB  Do_mysub() is executed continuously every 20 
seconds, is it ? How long does it take to execute Do_mysub() ?

In may case My_sub()  starts on user request. The user does it every few days. 
The user edits the name of the file than clicks the button GO....and waits 5 
minutes without being able to enter other datas into the form until My_sub() 
ends its task. 

It seems a different scenario.

Regards
Pino




More information about the User mailing list