FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use Ctrl-Enter as well as Enter to exit get.
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
How to use Ctrl-Enter as well as Enter to exit get.
Posted: Mon Dec 12, 2016 05:39 PM

All,

I would like to process a dialog of gets differently if the user presses ctrl-enter vs just enter.

How can I get the Get to recognize the Ctrl-Enter to move through the bValid, it seems that it does not go to the bValid unless Enter is hit.

I was hoping I could use ctrl-enter and test for the last key hit and process differently

Thanks,

Byron ...

Thanks,

Byron Hopp

Matrix Computer Services
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to use Ctrl-Enter as well as Enter to exit get.
Posted: Tue Dec 13, 2016 10:43 AM

Byron,

With GetKeyState( VK_CONTROL ) you can check if Ctrl is pressed

Try this:

oGet:bChange := { | nKey, nFlags | If( GetKeyState( VK_CONTROL ) .and. nKey == VK_RETURN, ( oAnotherControl:SetFocus(), .F. ), .T. ) }

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion