Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

keyboard input help!

4 views
Skip to first unread message

Lloyd Dupont

unread,
Dec 19, 2005, 1:29:16 AM12/19/05
to
I wrote my own C# TextBox (inherited from SWF.Control).
To do character input I'm overriding

protected virtual void OnKeyPress(KeyPressEventArgs e);

which has a property
public char KeyChar { get; set; }

However someone tried to enter some chineese character in my text box with
what he called "Microsoft's Simplified Chinese language insert tool" and he
reported various bug:
- display problem (that's probably a bug in my uniscribe wrapper)
- character double (when he wrote 2 character, he got twice the same)
- a few other..
which make me wonder, is there some special handling to do to input
international text?

Although I found some information on MSDN on IME, this is all win32 and .NET
documentation doesn't talk about that all, just like it should just work! by
overriding OnKeyPress, I suppose...

Any tip?


Michael (michka) Kaplan [MS]

unread,
Dec 19, 2005, 7:30:55 AM12/19/05
to
Does it happen with either GDI+ or GDI/Uniscribe? If so then I would blame
the insert to9ol, if not then it is probably your wrapper.

Though in truth, I think it is really neither. The real problem is that your
code is not in the right place. Rendering in owner draw controls is not to
be done in keypress events; it should be happening in paint events?


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.

"Lloyd Dupont" <net.galador@ld> wrote in message
news:epg2PWGB...@TK2MSFTNGP15.phx.gbl...

Lloyd Dupont

unread,
Dec 19, 2005, 7:34:33 PM12/19/05
to
Of course it happens in Paint event!
But when there in an OnKeyPress, it's usually followed by an Invalidate(),
which leads to OnPaint() as we well know ;-)


I would wait for the customer to give me more information to know...
Out of curiosity I copy/pasted his chineese character without trouble, but
haven't typed them myself so far...

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
"Michael (michka) Kaplan [MS]" <mic...@microsoft.online.com> wrote in
message news:uXMfKgJB...@TK2MSFTNGP14.phx.gbl...

Michael (michka) Kaplan [MS]

unread,
Dec 20, 2005, 2:33:52 PM12/20/05
to
Yes, but timing is important -- as is putting the code in the right event.

MichKa

"Lloyd Dupont" <net.galador@ld> wrote in message

news:%23tn5s0P...@TK2MSFTNGP10.phx.gbl...

0 new messages