My C # ActiveX Control is the host in IE 8. I want to execute code when the control is unloaded.
I tried the following:
...
public class ActiveXControl : Control
{
protected override void Dispose(bool disposing)
{
if (disposing)
{
}
}
}
...
But utilization is always false (called from the finalizer). Since I need to access managed objects, I cannot use this one.
How can I get the cleanup code that gets called when the browser unloads the control?
I found the IOleObject :: Close method, which is implemented by the Control class, but AFAIK is not a way to override its behavior.
source
share