@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetClientRect API !!!!C# Signature: [DllImport("user32.dll")] static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect); !!!!VB Signature: <DllImport("user32.dll", CharSet:=CharSet.Auto)> _ Private Shared Function GetClientRect(ByVal hWnd As System.IntPtr, _ ByRef lpRECT As RECT) As Integer ' Leave function empty End Function !!!!User-Defined Types: [RECT] !!!!Notes: The Win32 RECT structure is not compatible with the .NET System.Drawing.Rectangle structure. !!!!Tips & Tricks: It's easier to use with a tiny wrapper method. public static RECT GetClientRect(IntPtr hWnd) { RECT result; GetClientRect(hWnd, out result); return result; } Usage RECT clientRect = GetClientRect(handle); !!!!Sample Code: Please add some! !!!!Alternative Managed API: Do you know one? Please contribute it! ClientRectangle property of the System.Windows.Forms.Control class Documentation: GetClientRect@msdn on MSDN
Edit user32.GetClientRect
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.