1. Removing BEEP's?

------=_NextPart_000_000A_01BF5EC1.8AFD0500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

--=3D[this is just a part of the program]=3D--
=20
global constant EName =3D create(EditText, "", MainWindow, 100, 125, =
168, 25, 0),
                EAddress =3D create(EditText, "", MainWindow, 100, 165, =
168, 25, 0),
                EPhone1 =3D create(EditText, "", MainWindow, 100, 205, =
168, 25, 0)
=20
procedure Enter_EName(integer key, integer shift)
  if key=3D13 then setFocus(EAddress) else end if
end procedure
onKeyPress[EName] =3D routine_id("Enter_EName")

procedure Enter_EAddress(integer key, integer shift)
  if key=3D13 then setFocus(EPhone1) else end if
end procedure
onKeyPress[EAddress] =3D routine_id("Enter_EAddress")

--=3D[eof]=3D--

so... are you can see, EName, EAddress and EPhone are EditText... When I =
type something on it and press <ENTER> I hear a beep. Does anybody here =
know how can I remove this beep?


Thanks,
Lu=EDs Fernando

------=_NextPart_000_000A_01BF5EC1.8AFD0500
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Courier New" size=3D1>--=3D[this is just a part of =
the=20
program]=3D--</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>&nbsp;</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>global =
constant&nbsp;</FONT><FONT=20
face=3D"Courier New" size=3D1>EName =3D create(EditText, "", MainWindow, =
100, 125,=20
168, 25,=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EAddress=20
=3D create(EditText, "", MainWindow, 100, 165, 168, 25,=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EPhone1=20
=3D create(EditText, "", MainWindow, 100, 205, 168, 25, 0)</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>&nbsp;</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>procedure Enter_EName(integer =
key, integer=20
shift)<BR>&nbsp; if key=3D13 then setFocus(EAddress) else end if<BR>end=20
procedure<BR>onKeyPress[EName] =3D =
routine_id("Enter_EName")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>procedure =
Enter_EAddress(integer key,=20
integer shift)<BR>&nbsp; if key=3D13 then setFocus(EPhone1) else end =
if<BR>end=20
procedure<BR>onKeyPress[EAddress] =3D =
routine_id("Enter_EAddress")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>--=3D[eof]=3D--</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>so... are you can see, EName, =
EAddress and=20
EPhone are EditText... When I type something on it and press =
&lt;ENTER&gt; I=20
hear a beep. Does anybody here know how can I remove this =
beep?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>Thanks,</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>Lu=EDs =

------=_NextPart_000_000A_01BF5EC1.8AFD0500--

new topic     » topic index » view message » categorize

2. Re: Removing BEEP's?

MiCkeY wrote:

> Does anybody here know how can I remove this beep?

Change the code to :

   if key=13 then

      -- change the focus
      setFocus(EAddress)

      -- prevent default processing
      returnValue( True )

   end if

Basically, Win32Lib allows you to take action, and then hands the control
back to Windows to allow the program to continue with the default
processing. You can prevent this by setting the returnValue to True. This
informs Win32Lib that you've taken action, and *not* to perform any more
processing.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu