Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Fix the focus issue on RDP Client from the AxInterop.MSTSCLib.dll

, 18 Oct 2011
Rate this:
Please Sign up or sign in to vote.
public class MsTSCLib2 : AxMSTSCLib.AxMsTscAxNotSafeForScripting{ public MsTSCLib2() : base() { } protected override void WndProc(ref System.Windows.Forms.Message m) { //Fix for the missing focus issue on the rdp client component if (m.Msg ==...
public class MsTSCLib2 : AxMSTSCLib.AxMsTscAxNotSafeForScripting
{
    public MsTSCLib2() : base()
    {
    }
 
    protected override void WndProc(ref System.Windows.Forms.Message m)
    {
        //Fix for the missing focus issue on the rdp client component
        if (m.Msg == 0x0021)
        //WM_MOUSEACTIVATE ref:http://msdn.microsoft.com/en-us/library/ms645612(VS.85).aspx
            this.Focus();
        base.WndProc(ref m);
    }
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

BruceCarson
Software Developer (Senior) Bluestone Consulting Group
United States United States
No Biography provided

Comments and Discussions

 
AnswerThanks! PinmemberAgustín Rodríguez23-Sep-13 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 18 Oct 2011
Article Copyright 2011 by BruceCarson
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid