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

preventing Keystrokes

Hello. I am trying to prevent users from using the "Delete" and
"Backspace" keys on the keyboard in my application. Any help would be
greatly appreciated.

Thank You,

Brenton Walker Garman
Apr 4 '06 #1
1 1093
Hello Brenton,

You can use code below for the specific controls in you app, but if you need
to handle for the whole app, use global hooks. Google for samples

if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Delete)
{
MessageBox.Show("Key is pressed");
}

BG> Hello. I am trying to prevent users from using the "Delete" and
BG> "Backspace" keys on the keyboard in my application. Any help would
BG> be greatly appreciated.
BG>
BG> Thank You,
BG>
BG> Brenton Walker Garman
BG>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Apr 4 '06 #2

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

Similar topics

2
by: Olli Piepponen | last post by:
Hi, I'm having a little problem catching keystrokes under Windows. I did a little research and found that with mscvrt.getch() one can cath a single key that is pressed. However this doesn't work...
2
by: Steven Raasch | last post by:
I would really like to send keystrokes to a QT application from another program. The ideal situation would allow me to use STDIN, but I'm guessing that this is not going to happen. Keeping in...
1
by: Zaidan | last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA code (I will consider using javascript if I have to) that does the following, at the user command: 1- Start MS Explorer and...
3
by: Wayne | last post by:
I have a console application (ssh2.exe) that requires keystrokes to be sent to it after activating. I have worked that it needs to be started in it own thread, but capturing the process and...
5
by: Lucas Tam | last post by:
Hi all, Has anyone done this before? Send client side keystrokes to an application from a webpapge? This maybe more of a Javascript question. In short, I have an application on the client's...
2
by: zak | last post by:
I have some testing to do and I need to put a whole set of data in I want to Record and replay in a loop keystrokes. An idea
2
by: Tim Diggle | last post by:
I'm trying to enter data into a database application running under Citrix ICA Client. I'm doing it from a VBA macro running under Microsoft Excel 2000 (although it may need to be backwardly...
3
by: Gunnar Syren | last post by:
I'm trying to implement a macro feature in my application by recording and playing back keystrokes. At first I thought it would be enough to catch KeyDown in my main form, but I soon realized that...
1
by: zanthor | last post by:
Ok... so call me crazy, but I have an idea and I'm looking for where to start... I want to write an application that catches keystrokes and then either redirects them to the in focus window or...
4
by: Vighneswar | last post by:
Hi All Can anybody please suggest me in this regard that I need to capture the keystrokes on all the word processors (Ms Word, Excel .. Etc), text editors (Notepad .. Etc) and suggest nearer...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.