Implementing this in a derived window helps a little - but does not completely solve the problem:
protected override void OnDeactivated(EventArgs e) { var host = System.Windows.Input.FocusManager.GetFocusedElement(this) as System.Windows.Forms.Integration.WindowsFormsHost; if (host !=null ) { Focus(); } base.OnDeactivated(e); }
It sets the focus on the window when deactivating - this is not early enough, so the activation leans back, but when you press Alt-Tab a second time, it switches. However, concentrated management is not maintained. I tried adjusting the focus, but nothing good.
Rune andersen
source share