473,387 Members | 1,548 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,387 software developers and data experts.

ALT-key blocking query

In order to block using the ALT butto,

I use

tb.KeyPress += etc

and

a function containing

if(e.KeyChar == (char)56)
e.Handled is true;

No syntax errors,
however, this isn't working.

Please comment.
Thank you,
Patrick.

Nov 15 '05 #1
2 1285
Patrick,

The KeyPress event doesn't handle the ALT key. Rather, you will have to
use the KeyDown and KeyUp events to handle that key.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Patrick De Ridder" <wa********@all.here> wrote in message
news:10***************@news-01.evisp.enertel.nl...
In order to block using the ALT butto,

I use

tb.KeyPress += etc

and

a function containing

if(e.KeyChar == (char)56)
e.Handled is true;

No syntax errors,
however, this isn't working.

Please comment.
Thank you,
Patrick.


Nov 15 '05 #2
Thanks. I'll give it a try.

Patrick.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eN**************@tk2msftngp13.phx.gbl...
Patrick,

The KeyPress event doesn't handle the ALT key. Rather, you will have to use the KeyDown and KeyUp events to handle that key.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Patrick De Ridder" <wa********@all.here> wrote in message
news:10***************@news-01.evisp.enertel.nl...
In order to block using the ALT butto,

I use

tb.KeyPress += etc

and

a function containing

if(e.KeyChar == (char)56)
e.Handled is true;

No syntax errors,
however, this isn't working.

Please comment.
Thank you,
Patrick.



Nov 15 '05 #3

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

Similar topics

2
by: Rick | last post by:
how would you create a function in the following script that would change the alt description of the image via a mouseover event. See end of script. Thanks in advance. RICK <script...
8
by: Lian | last post by:
Hi all, It is a newbie's question about html tag "img". The attributes "title" and "alt" for "img" seems having the same function. So what is the main difference between them? Can i use them at...
39
by: fleemo17 | last post by:
I'm wondering whether it's better to leave an alt tag blank (alt=" ") or specify something like "alt='spacer'" when referring to objects that merely help the layout of the page? -Fleemo
1
by: Garmt de Vries | last post by:
On my pages, I use a couple of images (with appropriate alt texts of course) for decoration purposes. For example: <p> Blablabla about some topic.<br> <a href="foo.html"> <img src="see.gif"...
4
by: Adam J. Schaff | last post by:
How can I issue an Alt+Tab command from within VB.NET code? Specifically, I am trying to swap to the next application in the Alt+Tab order in a way that is reversible with a single Alt+Tab to get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.