dhxWindow size adjust to form size

Hi,
I am creating a dhxWindow and then attach a form to it. The form configuration comes from my backend and will be different on different calls.
I want to avoid scrollbars in the form as long as the window will fit to the browser window. So I will have to do some maths. But: The base of that must be the size of the form DOM element.
How can I get the size of a form object?

regards
Robert