ProgressBar.Top PropertyGets or sets the top location of the ProgressBar object.object.Top ([value]) Arguments
Return ValueThe ProgressBar.Top property returns the current number of pixels from the top edge of the dashboard to the top edge of the ProgressBar.RemarksWhen attemting to set the property value, it is good to check the return value to ensure that the value was set.The following example illustrates the use of the Top property. var dash = ActiveDocument.Sections["Dashboard"]; dash.pb0001 = new ActiveDocument.ProgressBar(dash); with (dash.pb0001) { Left(300); var iTop = Top(200); if (iTop == 200) { // success } Height(32); Width(160); Value(0); MaxValue(100); Show(); for (var i = 1; i <= dash.pb0001.MaxValue() / 2; i++) { var a = (new Date()).valueOf(); while ((new Date()).valueOf() - a < 10) { DoEvents(); DoEvents(); } dash.pb0001.Value(i * 2); } } Applies To:ProgressBar ObjectRequirements |