Escape Character \e does not work

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

    #16
    Re: Escape Character \e does not work

    Tom that is the better way to do it.

    Thanks.



    "Tom Porterfield" wrote:
    [color=blue]
    > pkaeowic wrote:[color=green]
    > > I am having a problem with the "escape" character \e. This code is in my
    > > Windows form KeyPress event. The compiler gives me "unrecogniz ed escape
    > > sequence" even though this is documented in MSDN. Any idea if this is a
    > > bug?
    > >
    > > if (e.KeyChar == '\e')
    > > {
    > > this.Close();
    > > }[/color]
    >
    > You should look at doing the following instead:
    >
    > if (e.KeyChar == (char)Keys.Esca pe)
    > {
    > this.Close();
    > }
    >
    > --
    > Tom Porterfield
    >[/color]

    Comment

    Working...