public TimedSpalshScreen(Rectangle dimensions, double opacity, Dispatcher currentDispatcher) { try { this.TimedSplashScreenForm = new Form { Opacity = opacity, ControlBox = false, Text = string.Empty, FormBorderStyle = FormBorderStyle.None, TopMost = true }; this.Messagelabel = new Label { AutoSize = true, Visible = true, Font = new Font("Arial", 14, FontStyle.Bold), MaximumSize = new Size(0, 100) }; this.ProgressBar = new ProgressBar { Maximum = 10, Step = 1, Visible = true }; this.TimedSplashScreenForm.Controls.Add(this.Messagelabel); this.TimedSplashScreenForm.Controls.Add(this.ProgressBar); this.ProgressBar.Location = new Point((dimensions.Width / 2) - (this.ProgressBar.Width / 2), dimensions.Height / 2); this.CurrentDispatcher = currentDispatcher; WindowList.MoveWindow(this.TimedSplashScreenForm.Handle, dimensions.X + dimensions.Width - dimensions.Width / 3, dimensions.Y, dimensions.Width / 3, dimensions.Height / 6, true); } catch (Exception e) { Logger.Info(e.Message + e.InnerException?.Message); } }