public extern static int GetClientRect(IntPtr hWnd, ref RECT rc); [DllImport("user32.dll", CharSet=CharSet.Auto)]