/// <summary> /// Display the form on each of the computer's monitors. /// </summary> static void ShowScreenSaver() { foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds); screensaver.Show(); } }
static void ShowScreenSaver() { foreach (Screen screen in Screen.AllScreens) { //ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds); ScreenSaverForm screensaver = new ScreenSaverForm(new System.Drawing.Rectangle(0, 0, 800, 800)); screensaver.Show(); } }
static void ShowScreenSaver() { //S'il y a au moins 1 écran foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds); screensaver.Show(); } }
static void ShowScreenSaver() { foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds); //Rectangle size = new Rectangle(0,0,800,600); //ScreenSaverForm screensaver = new ScreenSaverForm(size); screensaver.Show(); } }
/// <summary> /// Display the form on each of the computer's monitors. /// </summary> static void ShowScreenSaver() { int i = 0; var multiscreenDisabled = new RegSettings().MultiscreenDisabled; foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds); // disable video on multi-displays (3+) except the first if (Screen.AllScreens.Length > 2 && i != 0 && multiscreenDisabled) screensaver.ShowVideo = false; i++; screensaver.Show(); } }
/// <summary> /// Display the form on each of the computer's monitors. /// </summary> static void ShowScreenSaver() { int i = 0; var multiscreenDisabled = new RegSettings().MultiscreenDisabled; foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm screensaver = new ScreenSaverForm(screen.Bounds, i == 0); // disable video on multi-displays (3+) except the first if (Screen.AllScreens.Length > 2 && screen != Screen.PrimaryScreen && multiscreenDisabled) { screensaver.ShowVideo = false; } i++; screensaver.Show(); } }
/// <summary> /// Shows the screen saver. /// </summary> protected virtual void Show() { foreach (Screen screen in Screen.AllScreens) { Control screenSaverControl = this.screenSaverConfiguration.CreateScreenSaverControl(screen); screenSaverControl.EnableDoubleBuffering(); if (screenSaverControl == null) { throw new ArgumentNullException("IScreenSaverConfiguration.CreateScreenSaverControl()"); } ScreenSaverForm form = new ScreenSaverForm(screenSaverControl, screen); form.Show(); } this.StartMouseMoveDetection(); Application.Run(); }