public static void CloseAll() { int err = HalconAPI.HWindowStackCloseAll(); if (err != 2) { throw new HalconException(err, "HDevWindowStack::CloseAll"); } }