public PixelZoom(EyeDropper parent) { this.parent = parent; this.ShowInTaskbar = false; this.TopMost = true; this.FormBorderStyle = FormBorderStyle.None; this.StartPosition = FormStartPosition.Manual; //We intentionally set the bounds after showing the form. //This bypasses a bug in the Form class when setting the //bounds internally before calling the Show() method. this.Show(); setBounds(); //Paint the bounds as a rounded rectangle... System.Drawing.Graphics g = this.CreateGraphics(); g.SmoothingMode = SmoothingMode.AntiAlias; GraphicsPath gpArea = this.BuildRoundedRectangle(new Rectangle(shadow, shadow, this.Width - shadow, this.Height - shadow), 20); using (SolidBrush sb = new SolidBrush(Color.FromArgb(150, Color.Black))) { g.FillPath(sb, gpArea); } g.TranslateTransform(-shadow, -shadow); g.FillPath(Brushes.WhiteSmoke, gpArea); g.DrawPath(Pens.Black, gpArea); g.Dispose(); gpArea.Dispose(); }