473,466 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Keypress detection

How does one detect (in code) when the Delete key has been pressed. The
KeyPress event doesn't respond to this keystroke.

Thanks,

Gord
Sep 27 '08 #1
2 5372
rkc
On Sep 27, 1:06*pm, "Gord" <x1gor...@telus.netwrote:
How does one detect (in code) when the Delete key has been pressed. *The
KeyPress event doesn't respond to this keystroke.

Thanks,

Gord
Trap for a Keycode value of vbKeyDelete in the KeyUp event of a
particular control or the form itself depending on what you're up to.

You will have to set the form's key preview property to yes to trap
it at form level.
Sep 27 '08 #2
Thanks rkc. I think I can work with that.

Gord

"rkc" <rk*@rkcny.comwrote in message
news:81**********************************@l64g2000 hse.googlegroups.com...
On Sep 27, 1:06 pm, "Gord" <x1gor...@telus.netwrote:
How does one detect (in code) when the Delete key has been pressed. The
KeyPress event doesn't respond to this keystroke.

Thanks,

Gord
Trap for a Keycode value of vbKeyDelete in the KeyUp event of a
particular control or the form itself depending on what you're up to.

You will have to set the form's key preview property to yes to trap
it at form level.
Sep 28 '08 #3

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

Similar topics

3
by: Hamish | last post by:
I am trying to detect the up and down keys on a key press function, but they do not seem to generate a keypress call. Is there another event generated when these keys are pressed Thanks. PS...
3
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
1
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
4
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
0
by: osku200 | last post by:
So i have a game where the objective is to dodge cubes falling from the top of the form so they don't collide with your cube on the bottom of the form. I'm using an array to detect keypresses and key...
0
by: origami.takarana | last post by:
Intrusion Detection Strategies ----------------------------------- Until now, we’ve primarily discussed monitoring in how it relates to intrusion detection, but there’s more to an overall...
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
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
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
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.