ProgressBar ObjectAn object to display progress.RemarksA ProgressBar object provides the user with an indication that something is happening and how far it is from being done.The following code illustrates how to create a ProgressBar object: var dash = ActiveDocument.Sections["Dashboard"];
dash.pb0001 = new ActiveDocument.ProgressBar(dash);
with (dash.pb0001) {
Left(300); // set the location of the left edge
Top(200); // set the location of the top edge
Height(32); // set the height
Width(160); // set the width
Value(0); // set the current value
MaxValue(100); // set the maximum value
Show(); // show the progressbar
// demonstrate the functionality by incrementing the current value in a loop
for (var i = 1; i <= dash.pb0001.MaxValue() / 2; i++) {
var a = (new Date()).valueOf();
// wait 10 milliseconds before incrementing
while ((new Date()).valueOf() - a < 10) {
// allow time for other operations (like a screen refresh) to occur
DoEvents();
DoEvents();
}
// update the current value of the progressbar
dash.pb0001.Value(i * 2);
}
}
MethodsShow Method | Hide MethodPropertiesLeft Property | Top Property | Width Property | Height Property | Value Property | MaxValue PropertyRequirementsSee AlsoProgressBar Class |