GetClientRect

    GetClientRect - Window나 Control의 좌표값 얻기

    Declare Function GetClientRect Lib "user32" Alias "GetClientRect" (ByVal hwnd As Integer, ByRef lpRect As RECT) As Integer - VB.NET 선언 [DllImport("user32")] public static extern int GetClientRect(int hwnd, ref RECT lpRect); - C# 선언 GetClientRect함수의 첫번째 인수는 좌표를 구하고자할 Window나 Control의 Handle을 넘기고 두번째 인수에는 해당 좌표값을 담아둘 구조체를 기술합니다. 만일 현재 실행중인 Form의 위치및 좌표를 구하고자 한다면 GetClientRect함수는 다음과 같이 선언될 수 있습니다...