I coded for you a DropShadowPanel that processes the controls inside it and adds shadows (external or internal) as required by the control tag.
As you can see in the image controls, their shadows are defined as:
tags:
textbox: DropShadow: 5,5,5,10, # 000000, noinset
Calendar: DropShadow: 10,10,80,30, # 0000FF, noinset
picturebox top left: DropShadow: -50,20,50,10, # 888888, noinset
bottom left picture: DropShadow: 10,10,20,20, # 442200, insert
right shot: DropShadow: 0,0,50,50, # 442200, noinset

Here is the code for the panel: (it uses intermediate drawings in the image before drawing on the gdi control object, so as not to perform form traversal - it really works pretty quickly)
using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication4 { public class DropShadowPanel : Panel { protected override void OnControlAdded(ControlEventArgs e) { e.Control.Paint += new PaintEventHandler(Control_Paint); base.OnControlAdded(e); } void Control_Paint(object sender, PaintEventArgs e) { CheckDrawInnerShadow(sender as Control, e.Graphics); } private void CheckDrawInnerShadow(Control sender, Graphics g) { var dropShadowStruct = GetDropShadowStruct(sender); if (dropShadowStruct == null || !dropShadowStruct.Inset) { return; } DrawInsetShadow(sender as Control, g); } protected override void OnControlRemoved(ControlEventArgs e) { e.Control.Paint -= new PaintEventHandler(Control_Paint); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); DrawShadow(Controls.OfType<Control>().Where(c => c.Tag != null && c.Tag.ToString().StartsWith("DropShadow")), e.Graphics); } void DrawInsetShadow(Control control, Graphics g) { var dropShadowStruct = GetDropShadowStruct(control); var rInner = new Rectangle(Point.Empty, control.Size); var img = new Bitmap(rInner.Width, rInner.Height, g); var g2 = Graphics.FromImage(img); g2.CompositingMode = CompositingMode.SourceCopy; g2.FillRectangle(new SolidBrush(dropShadowStruct.Color), 0, 0, control.Width, control.Height); rInner.Offset(dropShadowStruct.HShadow, dropShadowStruct.VShadow); rInner.Inflate(dropShadowStruct.Blur, dropShadowStruct.Blur); rInner.Inflate(-dropShadowStruct.Spread, -dropShadowStruct.Spread); double blurSize = dropShadowStruct.Blur; double blurStartSize = blurSize; do { var transparency = blurSize/blurStartSize; var color = Color.FromArgb(((int)(255 * (transparency * transparency))), dropShadowStruct.Color); rInner.Inflate(-1,-1); DrawRoundedRectangle(g2, rInner, (int)blurSize, Pens.Transparent, color); blurSize--; } while (blurSize > 0); g.DrawImage(img, 0, 0); g.Flush(); g2.Dispose(); img.Dispose(); } void DrawShadow(IEnumerable<Control> controls, Graphics g) { foreach (var control in controls) { var dropShadowStruct = GetDropShadowStruct(control); if (dropShadowStruct.Inset) { continue;
The code is written quickly without much review, so there may be errors, especially if you set labels on the controls).
PS. You may notice that the inner shadow does not work for some controls. This is because they are wrappers around Windows system controls. The panel cannot overcome this on its own, but you can do it like this: http://www.codeproject.com/Articles/4548/Generating-missing-Paint-event-for-TreeView-and-Li