static void ShowProgram() { _settings.Debug = true; ScreenSaverForm form = new ScreenSaverForm(_settings, false); Application.Run(form); }
public ScreensaverApplicationContext(WordClockSettings settings, bool isScreensaver = false, IntPtr previewHandle = default(IntPtr)) : base() { foreach (Screen screen in Screen.AllScreens) { ScreenSaverForm form = new ScreenSaverForm(settings, isScreensaver, previewHandle); _forms.Add(form); form.Closed += OnFormClosed; // position the form on the relevant screen form.StartPosition = FormStartPosition.Manual; Rectangle bounds = screen.Bounds; form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height); form.Show(); } }