473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

My KeyPressEventHandler does NOT fire

my KeyPressEventHandler does not work in my form.
I have searched the forum, but nothing seems to be similar to my issue. Can
anyone please help.

public partial class Form_Cust : Form
{
public Form_Cust()
{
InitializeComponent();
this.KeyPreview = true;
this.KeyPress += new KeyPressEventHandler(this.myKeyPressed);

}
public void myKeyPressed(object sender, KeyPressEventArgs key)
{
MessageBox.Show(key.KeyChar.ToString());
}
}
Sep 23 '07 #1
0 1481

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

Similar topics

9
by: HJ | last post by:
Hi all, I notice that the Form_Dirty event does not fire in Access 2002 (SP-1) when the first character is typed into a new record. In previous versions of Access it does fire. For existing...
2
by: Claudia Fong | last post by:
Hi, I know there is a textBox1_KeyPress event, but what is the name should I put after the InitializeComponent() this.textBox1.KeyPress += new...
9
by: J.Marsch | last post by:
I must be missing something here: The Init event for controls does not seem to fire. What I did: Drop a textbox on a blank webform, hook the textbox's Init event. Code: this.Textbox1.Value =...
3
by: Piotr Strycharz | last post by:
Hi, I have a Repeater with CheckBox in one of its columns. In ItemDataBound handler I'm doing: chk.CheckedChanged += new EventHandler(chk_CheckedChanged). The chk_CheckedChanged handler is...
6
by: srallen | last post by:
I have a simple page that has a dropdown with autopostback=true and onselectedindexchanged is set to a function that never gets called (checked during debug). This page is subclassed from custom...
3
by: Jimmy | last post by:
Hi, I built a webform with a repeater: <asp:repeater id="rep1" runat="server" DataSource='<%# ar %>'> <ItemTemplate> <asp:Button Runat=server Text="<%# Container.DataItem %>" ID="Button1"...
1
by: the friendly display name | last post by:
I am using .net 1.1 In the global.asax.cs file, there is this entry: protected void Application_AuthenticateRequest(Object sender, EventArgs e) as far as I know, it is wired with the ...
1
by: Steve | last post by:
Looking for some help on this one... I have three servers (development, staging, production), each running the same code. All three computers are running Windows 2003 Server, IIS 6.0. I have...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.