1. Beep on Enter in EditText controls
- Posted by jc at cowgar.com Aug 29, 2003
- 412 views
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
2. Re: Beep on Enter in EditText controls
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 29, 2003
- 401 views
----- 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
3. Re: Beep on Enter in EditText controls
- Posted by Greg Haberek <g.haberek at comcast.net> Aug 30, 2003
- 411 views
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! > >
4. Re: Beep on Enter in EditText controls
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 30, 2003
- 410 views
----- 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