FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
Quitar sonido de error al pulsar Enter
Hola, ¿alguien puede indicarme si es posible quitar el sonido de error cuando se pulsa ENTER en un TEdit?
El código que tengo es el siguiente: Código:
procedure TFormAnaglifo.EditBrilloKeyPress(Sender: TObject; var Key: Char); begin if ( StrScan('0123456789.-',Key) <> nil ) or ( Key = Char(VK_BACK) ) or ( Key = char(13) ) then { BackSpace Key } begin if (key = char(13)) and (EditBrillo.Text <> '') then begin ScrollBarBrillo.Position := StrToInt(EditBrillo.Text); EditBrillo.Visible := False; end; end else Key := #0; end; Miguel Angel http://imagen3d.site88.net/ |
#2
|
||||
|
||||
Hola,
Se ha tratado en estos foros más de una vez. Se trata de averiguar si es la tecla ENTER la que "dispara el evento", y, si es así, retornar en la variable "Key" el valor "0". |
#3
|
|||
|
|||
Efectivamente, esa era la solución. Simplemente añadiendo Key := #0
Código:
procedure TFormAnaglifo.EditColorRojoKeyPress(Sender: TObject; var Key: Char); begin if ( StrScan('0123456789.-',Key) <> nil ) or ( Key = Char(VK_BACK) ) or ( Key = char(13) ) then { BackSpace Key } begin if (key = char(13)) and (EditColorRojo.Text <> '') then begin ScrollBarRojo.Position := StrToInt(EditColorrojo.Text); EditColorRojo.Visible := False; Key := #0; end; end else Key := #0; end; Saludos... Miguel Angel http://imagen3d.site88.net/ |
Herramientas | Buscar en Tema |
Desplegado | |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Quitar sonido a MessageBox | Greco | Varios | 6 | 18-08-2007 06:49:21 |
Quitar sonido a Labelededit cuando presionas Enter | Alexis De la Cr | OOP | 1 | 16-09-2006 19:48:23 |
Pitido al pulsar Enter | JavierB | Varios | 2 | 06-04-2005 13:34:44 |
Quitar el sonido de la tecla ENTER | negama | Varios | 2 | 10-10-2003 19:24:21 |
Eliminar el sonido al dar ENTER| | negama | Varios | 2 | 02-09-2003 22:54:00 |
|