function showProg(cMode)
// uses data from the current work area
do case
case cMode="Open"
// create a progress message form and attach it to a public
// variable which will keep it alive after the function call ends
public w; w = new Progform()
w.total = ltrim(str(reccount()))
w.Count = 0
w.open()
case cMode="Close"
// close the form and release the public variable
w.close()
release w
otherwise
w.count += 1
w.Msg.Text = "Record Count: "+ltrim(str(w.count))+" of "+w.total
_app.executeMessages() && ensure text update (probably overkill)
endcase
return
class ProgForm of FORM
with (this)
metric = 6 // Pixels
text = "Progress"
autoSize = true
autoCenter = true
endwith
this.MSG = new TEXTLABEL(this)
with (this.MSG)
height = 24.0
left = 0.0
top = 0.0
width = 280.0
text = ""
borderStyle = 4 // Single
alignVertical = 1 // Middle
endwith
endclass
Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0