The way that I have used in the past is VIA DoEvents and an abort flag. Before your process loop begins set the abort flag off. Then while the process is running, check to see if the abort flag was turned on. Your cancel button can then turn the abort flag on. Now, in order for all of this to work, your going to need to call DoEvents periodically to allow the cancel button to be clicked.
For example, in your start button you would have code similar to this:
Procedure Start.Click()
This.l_Abort = .F.
Select MyTable
Scan While Not This.l_Abort
If RecNo() % 100 Then
DoEvents()
EndIf
EndScan
EndProc
And your stop button code would be something like this:
Procedure Stop.Click()
This.l_Abort = .T.
EndProc
I hope this helps.
Tyson Bonn