duplicated inputs with IME

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Dong JIA
Avatar
SyntaxEditor v3.0.0201, .NET 2.0, Windows XP, MicroSoft PINYIN Input method
If you input chinese with MS PinYin Input method, the chinese word you input will be dupilicated in the sample.

AND in my application, Not only the chinese but also the ASCII char will be dupilicated with the input methods.

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I have managed to duplicate this problem in a simple program. If you are familiar with the IME API and would like to debug my repro app, I'd be happy to send it over to you. My repro app shows how the entering of certain Chinese characters using IME will duplicate the target control's KeyPress event call. So what is happening is IME is sending the character twice to the target control.

Or if anyone else has used the IME API and would like to help out, please send us an email. We'd love to get this fixed but aren't sure if it's something we're doing wrong or not with the IME API.


Actipro Software Support

Posted 13 years ago by Dong JIA
Avatar
I am sorry that I am not familiar with the IME API. But I am willing to try your repro app and give your further response.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I really simplified the repro app and can duplicate it with this simple of a control:
    public partial class Editor : Control {

        public Editor() {
            InitializeComponent();
        }
        
        protected override void OnKeyPress(KeyPressEventArgs e) {
            base.OnKeyPress(e);

            if (e.KeyChar > 200)  // Show a messagebox with the character
                MessageBox.Show("Char:"  +e.KeyChar);
        }
    }
If I load that in a Form and run it with phonetic Chinese, I type a Chinese character using IME and then get two messageboxes to show (from the KeyPress code above). So that shows that we're not doing anything on our end. It seems like IME sends the character to the control twice. Any suggestions?

Is this perhaps a bug with Microsoft's code for Control in the .NET framework?


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.