// First you must make a public EventHandler: public event EventHandler MyEvent; // Then you need this code to raise the MyEvent event: protected virtual void OnMyEvent(EventArgs e) { if (MyEvent != null) MyEvent(this, e); }Then, your TextBoxes would need to have the usual delegates and EventHandlers for the KeyPress event:
this.MyTextBox.KeyPress += new KeyPressEventHandler(this.MyTextBox_KeyPressHandler); protected virtual void KeyPressHandler(object sender, KeyPressEventArgs e) { // Here is where you need to fire your Custom event: this.OnMyEvent(new EventArgs()); } // And all other controls that need to subscribe to the event would have // the usual delegates and EventHandlers: this.MyLabel.MyEvent += new System.EventHandler(this.MyLabel_MyEventHandler); private void MyLabel_MyEventHandler(object sender, System.EventArgs e) { // whatever your code needs to be }Hope this helps.