まず、クラス内に定義している変数や構造体、WindousAPIからusingして使っている関数達の定義を載せておきます。 //ウィンドウ名からウィンドウハンドルを取得(WindowsAPIの関数) [DllImport("user32.dll")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); //指定したウィンドウの外接する四角形の寸法を取得します(WindowsAPIの関数) [DllImport("user32.dll")] public static extern boo…