I found this article:
http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/default.aspx
that covers exactly what I want to do, have my windows.forms client side control (running in IE) call back to the Javascript. Except I can't get it to work.
It seems that browser is never registering for the event callback. I'm no COM expert (hate the stuff), and would appreciate any help in sorting this out.
Here's a snippet of my code from the control.
[ClassInterface( ClassInterfaceType.None ), ComSourceInterfaces( typeof( IPieWrapperCOMEvents ))]
public class PieWrapper : System.Windows.Forms.Panel, IPieWrapperCOMIncoming {
public delegate void PieClickedHandler( );
public event PieClickedHandler PieClicked;
public void DoPieClicked( string url )
{
if( PieClicked != null ){
PieClicked( );
}
}
}
And in the html....
< SCRIPT FOR="pieChart" EVENT="PieClicked" >
window.alert("test");
</script>
window.status = "uploading files...please wait";
window.status = "uploading files...please wait";
<object id="pieChart" classid=.....
BTW: this new forum stinks for posting code snippets...