protected OnHandleDestroyed ( |
||
e | ||
return | void |
protected override void OnHandleDestroyed(EventArgs e)
{
if (this.ExternalProcessCaptured)
{
// Send WM_DESTROY instead of WM_CLOSE, so that the Client doesn't
// ask in the Background whether the session shall be closed.
// Otherwise an annoying beep is generated everytime a terminal session is closed.
NativeMethods.PostMessage(m_AppWin, NativeMethods.WM_DESTROY, 0, 0);
System.Threading.Thread.Sleep(ClosePuttyWaitTimeMs);
m_AppWin = IntPtr.Zero;
}
base.OnHandleDestroyed(e);
}