Re: onKeyPress()

new topic     » goto parent     » topic index » view thread      » older message » newer message

George wrote:

> 1. I'm trapping all keystrokes now to handle but when the 'esc' or
'return'
> key is pressed, i receive the keystroke but windows 'beeps'. Why is this
and
> how to get rid of it? (on my office computer it 'clicks a sound' and on my
> win2000me laptop i get a loud 'bell')

Geez, George, first you ask how to make a beep, now you want to turn it off!
:)
I quote from the master:

Date:         Fri, 14 Jan 2000 13:58:48 -0800
From:         "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV>
Subject:      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


> 2. Are there any windows editText data types like date, numeric etc where
> windows will edit or use a print mask to display what is typed. (i.e. I
> would like to type in for a date 80601 and have displayed 8/06/01, for $
> amounts to always display 5.5 as 5.50)

> 3. If I am in data entry mode on the screen and change to another windows
> task and then return to the screen, windows starts the data entry at the
> beginning of the fields, not where I left off. Why is this and do I have
to
> know I was switched out and set the focus when I return?

I'm guessing that if you saved the currently focussed control in the
onLostFocus event
handler, and then restored focus to that control in the onGotFocus event,
that would
take care of the problem.

Regards,
Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu