1. Beep on Enter in EditText controls

Greetings.

I have created a onKeyUp handler to capture an Enter key press that will do 
a query on the database to see if a duplicate record exists. This works 
great but what I am having problems with is that Windows will cause a Beep 
or Ding in the speaker.

Is their anyway to stop this from happening on this field?

Thank you,

Jeremy

new topic     » topic index » view message » categorize

2. Re: Beep on Enter in EditText controls

----- Original Message ----- 
From: <jc at cowgar.com>
To: "EUforum" <EUforum at topica.com>
Subject: Beep on Enter in EditText controls


> 
> 
> Greetings.
> 
> I have created a onKeyUp handler to capture an Enter key press that will do 
> a query on the database to see if a duplicate record exists. This works 
> great but what I am having problems with is that Windows will cause a Beep 
> or Ding in the speaker.
> 
> Is their anyway to stop this from happening on this field?
> 

Instead of a KeyUp event, trap the KeyPress event and when you finish processing
the VK_ENTER key, call returnValue(-1) to signal that you want Windows to ignore
the key.

procedure onKeyPress(int self, int event, seq parms)
   if parms[1] = VK_ENTER then 
      -- Process the Enter key
      . . . 
      returnValue(-1)
   end if
end procedure

-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

3. Re: Beep on Enter in EditText controls

as your final statement before your routine exits, call   returnValue(-1)
which will prevent Windows from seeing the Enter key. You can also use this
to forward a different key to Windows, such as creating a password field by
calling  returnValue('*')  for every key press.

----- Original Message -----
From: <jc at cowgar.com>
To: "EUforum" <EUforum at topica.com>
Subject: Beep on Enter in EditText controls


>
>
> Greetings.
>
> I have created a onKeyUp handler to capture an Enter key press that will
do
> a query on the database to see if a duplicate record exists. This works
> great but what I am having problems with is that Windows will cause a Beep
> or Ding in the speaker.
>
> Is their anyway to stop this from happening on this field?
>
> Thank you,
>
> Jeremy
>
> --^----------------------------------------------------------------
> This email was sent to: g.haberek at comcast.net
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Beep on Enter in EditText controls

----- Original Message -----=20
From: "Greg Haberek" <g.haberek at comcast.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Beep on Enter in EditText controls


>=20
>=20
>=20
> as your final statement before your routine exits, call   =
returnValue(-1)
> which will prevent Windows from seeing the Enter key. You can also use =
this
> to forward a different key to Windows, such as creating a password =
field by
> calling  returnValue('*')  for every key press.
>=20

Actually, the returnValue(xxx) technique only applies to w32HKeyPress =
event, and not the KeyDown or KeyUp events.

--=20
Derek

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu