protected override void CreateSink() { // Make sure to call the base class or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(UnsafeNativeMethods.DWebBrowserEvents2)); }
//This method will be called to give you a chance to create your own event sink protected override void CreateSink() { //MAKE SURE TO CALL THE BASE or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
protected override void CreateSink() { //MAKE SURE TO CALL THE BASE or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
//This method will be called to give you a chance to create your own event sink protected override void CreateSink() { //MAKE SURE TO CALL THE BASE or the normal events won't fire //使基础 ActiveX 控件与可以处理控件事件的客户端相关联 base.CreateSink(); events = new WebBrowserExtendedEvents(this); //将ActiveX控件与事件相关联 cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
protected override void CreateSink() { // Make sure to call the base class or the normal events won't fire base.CreateSink(); // Create an instance of the client that will handle the event // and associate it with the underlying ActiveX control. events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(UnsafeNativeMethods.DWebBrowserEvents2)); }
protected override void DetachSink() { if (this.cookie != null) { this.cookie.Disconnect(); } this.cookie = null; this.events = null; base.DetachSink(); }
protected override void CreateSink() { base.CreateSink(); _events = new WebBrowserExtendedEvents(this); _cookie = new AxHost.ConnectionPointCookie(ActiveXInstance, _events, typeof(IDWebBrowserEvents2)); }
protected override void CreateSink() { base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
protected override void CreateSink() { base.CreateSink(); this.events = new WebBrowserExtendedEvents(this); this.cookie = new AxHost.ConnectionPointCookie(base.ActiveXInstance, this.events, typeof(WinFormsUI.Controls.UnsafeNativeMethods.DWebBrowserEvents2)); }
protected override void CreateSink() { base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }