public void ScreenToClient(ref idRectangle rect)
{
if(this.Disposed == true)
{
throw new ObjectDisposedException(this.GetType().Name);
}
int x, y;
idWindow p;
for(p = this, x = 0, y = 0; p != null; p = p.Parent)
{
x += (int) p.Rectangle.X;
y += (int) p.Rectangle.Y;
}
rect.X -= x;
rect.Y -= y;
}