*> Hello Experts,*

>

> I have a another PROBLEM. I need your help.

>

> I created a progress bar with 2 shapes on a form. The outer shape1 has a width of 400. The Inner shape2 starts with 0. There are 239 records in a table. I calculate the incremental value with this formula :

> mDONE = 400 / RECCOUNT() which in this case works out to 400/239 = 1.6736.

>

> then i use:

> SELE mFILE

> GO TOP

> DO WHILE NOT EOF()

> thisform.shape2.width = thisform.shape2.width + mDONE

> SKIP

> ENDDO

>

> My Problem.

> When I run the form the inner shape2 ends up halfway within the outer shape1. It is not covering the full length of 400. With (1.6736 * 239) it should end up at 400.

>

> If i use CEILING(mDONE) the length will exceed 400 AND overshoot the outer shape1.

>

>

> With FPW the above formula worked because the unit of calculation was 'columns'. How do i make it work with pixels in VFP.

>

> Another very important question:- Where should this code reside? I have put it in the 'init' proceedure of the form

>

>

> Thanks!

> kulwant

Hi,

First I believe that reccount() is not appropriate here because it counts deleted records too.

Secondly, you cannot managed to show graphics with fractions of pixel precision. Also, 1.6736 * 239 # 400, but 399.9904.

And the last, but not least, show the increment in portions, say 5% of the shape1.width.

Best Wishes,

Yuri Rubinov