473,960 Members | 27,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 KeyPressEventAr gs(myLeft));

return true;

case Keys.Down:

OnKeyPress(new KeyPressEventAr gs(myDown));

return true;

case Keys.Delete:

OnKeyPress(new KeyPressEventAr gs(myDelete));

return true;

case Keys.Back:

OnKeyPress(new KeyPressEventAr gs(myBack));

return true;

default:

return base.IsInputKey (key);

}

}
Nov 15 '05 #1
0 6904

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

Similar topics

3
2338
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 buffer. Thanks, ~djc
1
1755
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 works but regular backspace doesn't. Does anyone have any ideas? Posted Via Usenet.com Premium Usenet Newsgroup Services ----------------------------------------------------------
6
15612
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 key which IE interprets as a desire to return to the previous page. Thanks
17
50334
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 backspaces. Anyone have experiences with this?
1
3490
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 radiobuttons etc. In my naivete thought "ok, set KeyPreview=true" and i can then handle all the keys at the level of the form. Not so fast, cowboy. Navigation keys like Keys.Right are swallowed whole-- my nice Form.KeyDown event handler waits...
1
1436
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, but it also prevents then from using the backspace key. I know there is a way around this but can't find it.
1
6856
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. Someone wrote this override for IsInputKey in C# which apparently worked, and I tried to convert it to VB.Net but not working. Here is the C# version and following - my conversion. It would be great if anyone out there knows how to do this...
1
6268
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 cannot use IF/ELSE statement. ============================== <form> <textarea name="event_description" ONKEYPRESS="if (document.layers)
0
10118
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11759
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11499
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10839
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10037
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8407
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6345
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4687
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.