Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress bar and BatchMove

Status
Not open for further replies.

guava65

Programmer
Jul 20, 2001
238
US
Is there a way to display the progress of a batchmove using a progress bar?

Mahalo,
cg
 
The simple approach:
--------------------
Implement the AfterInsert- and AfterEdit-events on the Destination-TTable and do your own processing here.


The ideal approach:
-------------------
Ideally implement a callback-function and register it using
TBDECallBack (check help)

You callback-function should have the following signature:
function( CBInfo: Pointer ): CBRType of object;
and could look something like:

function TMyObject.MyProgressCallBack( CBInfo: Pointer ): CBRType;
begin
// Show Progress
end;

Your batchmove-operation should look something like:

procedure TMyObject.DoBatchMove;
var
aCallBack : TBDECallBack;

begin
aCallBack := TBDECallback.Create( Self, NIL, cbGENPROGRESS, @aCBSCType, SizeOf(CBSCType), MyProgressCallback, False );
BatchMove.Execute;
aCallBack.Free;
end;

(You must declare aCBSCType as CBSCType on the class TMyObject, and you must include the runtime-only unit
"BDE" in your project.
There are various constants that can be used with the callback. You find them in BDE32.hlp)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top