How to use Ctrl-Enter as well as Enter to exit get.

How to use Ctrl-Enter as well as Enter to exit get.

Postby byron.hopp » Mon Dec 12, 2016 5: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
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: How to use Ctrl-Enter as well as Enter to exit get.

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests