private void SplashScreen_Shown(object sender, EventArgs e) { // Create the drop shadow form when the splash screen is shown if (_dropShadow == null) { _dropShadow = new BitmapOverlayForm(); _dropShadow.Owner = this; _dropShadow.TopMost = false; _dropShadow.ShowInTaskbar = false; // Show the drop shadow form _dropShadow.Show(); } // Position the drop shadow form (has to be done after it's shown) _dropShadow.Top = this.Top - DropShadowOffset; _dropShadow.Left = this.Left - DropShadowOffset; // Create the drop shadow bitmap given the size of the background image Bitmap dropShadowBmp = new Bitmap(this.BackgroundImage.Width + DropShadowOffset * 2, this.BackgroundImage.Height + DropShadowOffset * 2, PixelFormat.Format32bppArgb); Graphics graphics = Graphics.FromImage(dropShadowBmp); DrawDropShadow(graphics, new Rectangle(0, 0, dropShadowBmp.Width, dropShadowBmp.Height), Color.FromArgb(255, 0, 0, 0), DropShadowOffset, 96); graphics.Dispose(); _dropShadow.Bitmap = dropShadowBmp; _dropShadow.BitmapOpacity = Opacity; // Make sure the splash screen and drop shadow are the frontmost windows when they appear BringToFront(); _dropShadow.BringToFront(); }