I had to modify your code a little to deal with some issues I was having. This will only focus if it needs to be focused.
public class MsRdpClient7 : AxMSTSCLib.AxMsRdpClient7
{
public MsRdpClient7()
: base()
{
}
protected override void WndProc(ref System.Windows.Forms.Message m)
{
if (m.Msg == 0x0021)
if (this.ContainsFocus == false)
{
this.Focus();
}
base.WndProc(ref m);
}
}
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.