namespace WinFormsMyComponents { public partial class MyButton : UserControl { public MyButton() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { MessageBox.Show("Пробный показ"); } } }