thisform.bStopLoop = .f. SCAN ........... DOEVENTS IF thisform.bStopLoop EXIT ENDIF ENDSCANIn your stop button Click EVent put:
thisform.bStopLoop = .t.
I am not sure iuf this will works in VFP7 becuase I don't know if VFP7 has DOEVENTS command (never worked with that version).