千巷猫影
private static Rectangle winRectangle = new Rectangle();public static bool SetFullScreen(bool fullscreen){int Hwnd = 0;Hwnd = CEBase.CommonApi.FindWindow("HHTaskBar", null);if (Hwnd == 0) return false;if (fullscreen){CommonApi.ShowWindow(Hwnd, CommonApi.SW_HIDE);Rectangle rectFull = Screen.PrimaryScreen.Bounds;CommonApi.SystemParametersInfo(CommonApi.SPI_GETWORKAREA, 0, ref winRectangle, CommonApi.SPIF_UPDATEINIFILE);//getCommonApi.SystemParametersInfo(CommonApi.SPI_SETWORKAREA, 0, ref rectFull, CommonApi.SPIF_UPDATEINIFILE);//set}else{CommonApi.ShowWindow(Hwnd, CommonApi.SW_SHOW);CommonApi.SystemParametersInfo(CommonApi.SPI_SETWORKAREA, 0, ref winRectangle, CommonApi.SPIF_UPDATEINIFILE);}return true;}