quick question on spacebar  
Author Message
b33k34





PostPosted: Mon Nov 10 07:47:56 CST 2003 Top

Visual C#.Net >> quick question on spacebar

Hi,

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

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

thanks.

DotNet41  
 
 
Nicholas





PostPosted: Mon Nov 10 07:47:56 CST 2003 Top

Visual C#.Net >> quick question on spacebar 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]




> Hi,
>
> does anyone know how to catch the spacebar with a keypress event....
>
> if (e.KeyChar == ????)
>
> thanks.
>
>


 
 
H





PostPosted: Mon Nov 10 08:00:16 CST 2003 Top

Visual C#.Net >> quick question on spacebar


> 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...


 
 
dawn





PostPosted: Mon Nov 10 08:02:42 CST 2003 Top

Visual C#.Net >> quick question on spacebar Thanks,

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



> 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]

>


> > Hi,
> >
> > does anyone know how to catch the spacebar with a keypress event....
> >
> > if (e.KeyChar == ????)
> >
> > thanks.
> >
> >
>
>