473,796 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

quick question on spacebar

Hi,

does anyone know how to catch the spacebar with a keypress event....

if (e.KeyChar == ????)

thanks.
Nov 15 '05 #1
3 7477
Dawn,

Have you tried ' '? If that doesn't work, then you might have to handle
the KeyUp event instead, and catch when the space bar is hit in that event.

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

"dawn" <da******@hotma il.com> wrote in message
news:gD******** ************@ph obos.telenet-ops.be...
Hi,

does anyone know how to catch the spacebar with a keypress event....

if (e.KeyChar == ????)

thanks.

Nov 15 '05 #2
H

"dawn" <da******@hotma il.com> skrev i meddelandet
news:gD******** ************@ph obos.telenet-ops.be...
Hi,

does anyone know how to catch the spacebar with a keypress event....

if (e.KeyChar == ????)

thanks.


Since I am a newbie I wouldn't pay to much attention to this, but maybe

if (e.KeyChar == Keys.Space )

works ? Works for Enter anyway...
Nov 15 '05 #3
Thanks,

' ' works.......som etimes life really is simple ain't it??? ;-)

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> schreef
in bericht news:ug******** ******@tk2msftn gp13.phx.gbl...
Dawn,

Have you tried ' '? If that doesn't work, then you might have to handle the KeyUp event instead, and catch when the space bar is hit in that event.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"dawn" <da******@hotma il.com> wrote in message
news:gD******** ************@ph obos.telenet-ops.be...
Hi,

does anyone know how to catch the spacebar with a keypress event....

if (e.KeyChar == ????)

thanks.


Nov 15 '05 #4

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

Similar topics

1
1898
by: julio | last post by:
I noticed that pressing spacebar when a listbox has the focus scrolls the listbox to the first selected item. I'm intercepting the spacebar press event at form level for stopping and starting audio playback, so I would like to remove the default behaviour form the listbox, and also from other buttons and controls. I tryed ( following a tutorial ) to subclass the listbox class, but I was able to intercept only mouseclicks, not the...
2
1551
by: L Mehl | last post by:
Hello -- Sometimes the code editor ignores the spacebar, and requires me to cursor through the line, after entering it, and hit the spacebar where I need a space. Has anyone experienced this? Can you tell me how to fix it? Thank you for any assistance.
16
2558
by: MLH | last post by:
In Access 97 and Access 2.0 applications, if a command button has the focus, the spacebar will 'PRESS" the key. How does one go about disabling this annoying BEATURE?
3
5142
by: Jason Kyle Baginski | last post by:
Here's a little test app to demonstrate a problem I'm having. It creates four buttons, each one with the different FlatStyle types available. Three of them behave exactly the same way(and the way I'd anticipate), but the FlatStyle.System one does not. If you click on any of the buttons, use the enter key, or the spacebar, they will bring up a messagebox that says "Activate". Except the FlatStyle.System one, which will bring up _two_...
0
1016
by: Bruce D | last post by:
I have three checkboxes lined up in a row on the dreaded datagrid. I have used the mouseup event to control whether or not the user can select a given box (i.e they can only select one box and they have to have one box selected)...basically working just as a radio button would do. My question is how can I use the same control for when the user tries to use the SpaceBar? My main concern here is that I cannot use addhandler to the boolcol...
11
2261
by: Bookham Measures | last post by:
Hello As above, my Ctrl + Spacebar for intellisense is not working in VI 6.0. I have checked keyboard assignments and Ctrl + Space is listed for Edit -> CompleteWord. I added Ctrl + Shift + Space and that does work, but Ctrl + Space does not. I removed Ctrl + Space thinking re-adding it might help, but now the
1
1219
by: PARITOSH CHANDRA DEY | last post by:
Hi When Spacebar Click Then See The All Item ? What Is The Coding? Paritosh
5
1373
by: prp | last post by:
Hi all, I have a problem in regularexpressionvalidator. I need that user can not enter any spacebar into the textbox.
1
3674
by: eben12 | last post by:
Hi guys! I'm currently building web application that make use of the spacebar and I need to disable the automatic pagedown that is taking place when pressing the spacebar. In Firefox, I use the following javascript on pageload window.onkeydown=function(e){ if(e.keyCode==32){ return false; } };
0
9680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
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
10455
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...
0
10228
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10173
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
10006
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
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4116
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 we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.