quick question on spacebar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dawn

    quick question on spacebar

    Hi,

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

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

    thanks.


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: 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]
    - mvp@spam.guard. caspershouse.co m

    "dawn" <dawn4715@hotma il.com> wrote in message
    news:gDMrb.1610 0$Kh5.564355@ph obos.telenet-ops.be...[color=blue]
    > Hi,
    >
    > does anyone know how to catch the spacebar with a keypress event....
    >
    > if (e.KeyChar == ????)
    >
    > thanks.
    >
    >[/color]


    Comment

    • H

      #3
      Re: quick question on spacebar


      "dawn" <dawn4715@hotma il.com> skrev i meddelandet
      news:gDMrb.1610 0$Kh5.564355@ph obos.telenet-ops.be...[color=blue]
      > Hi,
      >
      > does anyone know how to catch the spacebar with a keypress event....
      >
      > if (e.KeyChar == ????)
      >
      > thanks.[/color]

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


      Comment

      • dawn

        #4
        Re: quick question on spacebar

        Thanks,

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

        "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> schreef
        in bericht news:ug8qGG5pDH A.2964@tk2msftn gp13.phx.gbl...[color=blue]
        > Dawn,
        >
        > Have you tried ' '? If that doesn't work, then you might have to[/color]
        handle[color=blue]
        > the KeyUp event instead, and catch when the space bar is hit in that[/color]
        event.[color=blue]
        >
        > Hope this helps.
        >
        >
        > --
        > - Nicholas Paldino [.NET/C# MVP]
        > - mvp@spam.guard. caspershouse.co m
        >
        > "dawn" <dawn4715@hotma il.com> wrote in message
        > news:gDMrb.1610 0$Kh5.564355@ph obos.telenet-ops.be...[color=green]
        > > Hi,
        > >
        > > does anyone know how to catch the spacebar with a keypress event....
        > >
        > > if (e.KeyChar == ????)
        > >
        > > thanks.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...