So far I have got the following sample code that I have taken from other forums and google searches.
In the HTML page I have:
<OBJECT id="myControl" name="myControl" style="WIDTH: 208px; HEIGHT: 176px" height="176" width="208" classid="dll/ActiveXControl.dll#ActiveXControl.ButtonControl" VIEWASTEXT>
In my c# windows control project I have the following code:
public delegate void SelectClickEventHandler(object sender);
public class ButtonControl : System.Windows.Forms.UserControl
public event SelectClickEventHandler objectClicked;
// the rest of the component code follows
// then when I want to raise the event I call
private void ButtonControl_Click(object sender, System.EventArgs e)
if (objectClicked != null)
Am I on the right track and if so any suggestions on how to get it to work or is there another method I could use?