private void TransitionFromRunningToLoaded()
{
Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from");
if (this.ActiveXState == ActiveXHelper.ActiveXState.Running)
{
StopEvents();
//
// Inform the ActiveX control that it's been un-sited.
_axOleObject.SetClientSite(null);
//
// We are now Loaded!
this.ActiveXState = ActiveXHelper.ActiveXState.Loaded;
}
}