[Gambas-user] Closing a window in a DO LOOP

Pino Zollo pinozollo at ...626...
Sat May 10 01:01:56 CEST 2008


Hi everybody,
In a class  I have the following loop:

 DO
    GridVncdxf[Slot, 1].BackColor = &HEFFFBF&   
    T = Now
    i = Minute(T) MOD 3
    s = Second(T) DIV 10
    Slot = ((i * 6 + s - nf) + 18) MOD 18
    GridVncdxf[Slot, 1].BackColor = &HC5D5A6&
    WHILE Second(Now) MOD 10    
      IF ByBeacon THEN EXIT 
      WAIT 0.5
    WEND 
    IF ByBeacon THEN EXIT 
    WAIT 0.1
 LOOP 

It happens that while the program is executing this loop I can not close the
relative window and nither stop the program from  FMain. (Unless ByBeacon 
becomes TRUE, in which case the loop is ended and the window can be closed)

In the IDE only I can stop the program  with the STOP button.
Please how can I modify this piece of program to get a normal behaviour ?
(Developing in GAMBAS 2.5)

Thanks.

Pino




More information about the User mailing list