473,498 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[problem!]KeyPress event - wrong e.KeyChar.ToString on W98

in my application I sometimes use KeyPress event. in the event handler I
have to check the char the user is trying to type.

in NTs everything is correct. however on W98 I've noticed that the character
given in

e.KeyChar (e is KeyPressEventArgs of course)

is NOT correctly converted ToString() when I type polish specific letters!
instead of the letter 'polish l' I get '3', instead of 'polish z' I get '?'
and so on.

it seems that the KeyChar reported in KeyPressEventHandler cannot handle
these specific letters. this bug seems to stick deeply inside the .NET
libraries because in any other case the polish specific letters are
correctly converted to their string equivalents.

I consider this as a painful bug, however I would really like to hear from
an expert about it. I am also really curious if this bug affects other
localized versions of W98 (for example german, french, turkish etc.)

Regards,
Wiktor Zychla

shortest example:

using System;
using System.Windows.Forms;
using System.Drawing;

public class CForm : Form
{
TextBox t;

public CForm()
{
t = new TextBox();
t.KeyPress += new KeyPressEventHandler( tkp );
this.Controls.Add( t );
}

// type any culture specific letter
// in polish W98 you will not see the letter you've typed
// it seems to be a severe bug
void tkp( object sender, KeyPressEventArgs e )
{
MessageBox.Show( e.KeyChar.ToString() );
}

public static void Main()
{
Application.Run( new CForm() );
}
}
Nov 15 '05 #1
0 1711

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3045
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
11
3729
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
9
2215
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application...
117
7099
by: Peter Olcott | last post by:
www.halting-problem.com
0
3609
by: James Griffiths | last post by:
Here is a report I've written about a printing problem that is being experienced by a particular company for whom I had developed a A97 system. After upgrading to Win XP and AXP, some printing...
28
5168
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
11
1354
by: wASP | last post by:
Hi, I've got a pair of int properties in a class. The properties in question are indexing values - but that's not relevant to my problem - or it's just symptomatic ... sort of. They are...
4
1874
by: Trond Meistad | last post by:
I have a website where I run a simple asp.net web application. On Sunday night, requests to this webapplication started to time out. After much debuggeing with no result, I created a new...
0
2928
by: =?Utf-8?B?am8uZWw=?= | last post by:
Hello All, I am developing an Input Methop (IM) for PocketPC / Windows Mobile (PPC/WM). On some devices the IM will not start. The IM appears in the IM-List but when it is selected from the...
1
5099
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.