FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Press Shift on the column xBrowse
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Press Shift on the column xBrowse
Posted: Tue Sep 26, 2017 07:48 AM

Hello !

I press Shift on the column xBrowse and process is to a block of code bKeyDown. Is it possible to handle the event releasing Shift ?

Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Press Shift on the column xBrowse
Posted: Tue Sep 26, 2017 11:24 AM

you must create a func and insert a codeblock

type this:

oBrw:bKeyDown := {|nKey| MyfunctionTecla(nKey,oBrw,oDlg) }

Function MyfunctionTecla(nKey,oGrid,oDlg)
Do case
case nKey==VK_RETURN
// here your function of modify record
case nKey==VK_INSERT
// here your function of add record
case nKey==VK_DELETE
// here your function of delete record
case nKey==VK_ESCAPE
oDlg:End()
OTHERWISE
IF nKey >= 96 .AND. nKey <= 105
// here your function of search record
ELSEIF HB_ISSTRING(CHR(nKey))
// here your function of search record
ENDIF
EndCase

return nil

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Press Shift on the column xBrowse
Posted: Tue Sep 26, 2017 12:01 PM

I do not understand how using bKeyDown you can handle releasing the previously pressed the Shift key. I tried to use bKeyUp. Did not work

Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: Press Shift on the column xBrowse
Posted: Tue Sep 26, 2017 12:38 PM

Natter,

...
CASE ( nKey == VK_F11 )
if GetKeyState( VK_SHIFT )
endif
...

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin

Continue the discussion