Click here to Skip to main content
12,450,581 members (50,290 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

5.7K views
2 bookmarked
Posted

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

You may also be interested in...

Pro
Pro

Comments and Discussions

 
AnswerThanks! Pin
Agustín Rodríguez23-Sep-13 6:51
memberAgustín Rodríguez23-Sep-13 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.160826.1 | Last Updated 18 Oct 2011
Article Copyright 2011 by BruceCarson
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid