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

Tagged as

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

, 18 Oct 2011 CPOL
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)

Share

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 7: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 | Terms of Use | Mobile
Web03 | 2.8.150128.1 | Last Updated 18 Oct 2011
Article Copyright 2011 by BruceCarson
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid