FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse, bkeydown and number
Posts: 104
Joined: Tue Feb 09, 2021 04:20 PM
xbrowse, bkeydown and number
Posted: Wed Jan 08, 2025 03:13 PM
      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }
   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
Is it expected ?

Note:
1 from normal keyboard returns 49
1 from numeric keyboard returns 97

José M. C. Quintas Brazil

gtwvg, fivewin 25.12, hwgui, mingw 15.2 (32 bits)

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: xbrowse, bkeydown and number
Posted: Wed Jan 08, 2025 04:55 PM
Mira se ayuda,
// C:\FWH..\SAMPLES\TECLAS.PRG

#Include "FiveWin.Ch"

FUNCTION Main()

   LOCAL oWnd

   DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"

   oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }

   oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }

   ACTIVATE WINDOW oWnd

RETURN NIL
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse, bkeydown and number
Posted: Tue Jan 21, 2025 05:01 PM

Advised to use :bKeyChar instead of :bKeyDown

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion