<p>I am working on a winforms html editor with multiple editor windows as each editor window will be written to a database field.</p>

<p>I am creating the editor windows as a control array and was hoping to just have one toolbar above them that would handle the events such as apply bold, italic... based on the window I was currently in. Unfortunately obviously the event handler of an event on the toolbar doesn't know what the control selected before it was. </p>

<p>Is there a way to get this or should I be adding an onenter event to each editor window and storing statically the last editor window used.</p>

I'm not familiar with the types of events you mention, and I'm probably missing something, but it's common in WinForms development to have events fire and provide information about the sender as well as the event, conforming to the
EventHandler
delegate?
```
```
[SerializableAttribute]
[ComVisibleAttribute(true)]
public delegate void EventHandler(
    Object sender,
    EventArgs e
)
```
```
This is how
System.Windows.Forms.Control.Click
operates.
Could you follow this example, where
```
sender
```
would be the editor window in each case?