private static void CalcScreenRes() { var ptrToDesk = ExternalFunctions.GetDesktopWindow(); _RECT r = new _RECT(); ExternalFunctions.GetWindowRect(ptrToDesk, out r); ScreenWidth = r.right / 1.5; ScreenHeight = r.bottom / 2; Encoding.Unicode.GetBytes("hello"); }
public static extern bool GetWindowRect(IntPtr hWnd, out _RECT lpRect);