quick question on spacebar

  • Thread starter Thread starter dawn
  • Start date Start date
D

dawn

Hi,

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

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

thanks.
 
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.
 
dawn said:
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...
 
Thanks,

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

Nicholas Paldino said:
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]
- (e-mail address removed)

dawn said:
Hi,

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

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

thanks.
 
Back
Top