>>I didn't look closely into your code but maybe you should take into account the heght >of the control and do your calculation for the bottom of the control not it's top?
> I Just Calculate the max bottom of controls .The whole codes for scrollbar is below:
>
> Here is the use of the class.Now It is difficult for me the get the right formula of the scrollbar page portion.Could U Take U sometime to check my code.Thank U first.
It was just a suggestion. Sorry if it didn't work for you.
--sb--