class MyPanel : Panel { protected override void OnControlAdded(ControlEventArgs e) { MessageBox.Show("Control added"); base.OnControlAdded(e); } }Build the project, drag MyPanel from the Toolbox onto a form and add any control to the panel by dragging one onto the panel.