473,402 Members | 2,064 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,402 software developers and data experts.

IsInputKey KeyPressEvent Backspace key

Hi

I am trying to get an textbox control to work.
All of the Key.values are working all except for the Backspace key
I have the char value set to 8

Is there a different way of getting the Backspace key to work.

Bill
const char myLeft = (char)252;

const char myDown = (char)255;

const char myBack = (char)8;

const char myDelete = (char)127;

protected override bool IsInputKey(Keys key)

{

switch (key)

{

case Keys.Left:

OnKeyPress(new KeyPressEventArgs(myLeft));

return true;

case Keys.Down:

OnKeyPress(new KeyPressEventArgs(myDown));

return true;

case Keys.Delete:

OnKeyPress(new KeyPressEventArgs(myDelete));

return true;

case Keys.Back:

OnKeyPress(new KeyPressEventArgs(myBack));

return true;

default:

return base.IsInputKey(key);

}

}
Nov 15 '05 #1
0 6875

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

Similar topics

3
by: Dennis Craven | last post by:
Hello, Does anyone know how one could insert a backspace into a widget such as a TextView/Buffer in Pygtk? Whenever I try something like insert(iter, '\b') I get jibberish inserted into the...
1
by: haxmya | last post by:
Ok, made an explorer toolbar (band Object) with a textbox on it. Everything works great....except that the backspace button doesn't actually backspace when you're in the textbox. Shift-backspace...
6
by: Robert Nurse | last post by:
Hi, Is it at all possible to capture and suppress the backspace key when focus is not on a form edit control? Basically, while the page is loading I don't want the user pressing the backspace...
17
by: Julia Briggs | last post by:
Are there any gotchas using if (event.keyCode==8)? I understand that to represent backspace, but it doesn't work. I am running Windows XP, using a typical keyboard - but no luck in detecting...
1
by: woodBeeProgrammer | last post by:
Thanks to vJ (Vijaye Raji) for pointing out IsInputKey to me. However i admit i'm still confused about how to use it!! The scenario is i have a form on which there is are some groupboxes with...
1
by: cashdeskmac | last post by:
I have an event handler for a textBox with the following code inside: if(!Char.IsNumber(e.KeyChar) == true) e.Handled = true; This prevents anyone from entering a non-digit into the text box,...
1
by: Steve | last post by:
I would like to override the IsInputKey function in order to trap the arrow up/down keys in the Key Events. I understand that arrow keys don't have a char representation and thus, hard to trap. ...
1
by: Blue | last post by:
This JS limits the input characters into the form. How do I modify it so that it also allows CARRIAGE RETURN and BACKSPACE (for making text correction)? Due to the template engine I am using, I...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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,...

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.