nKey return Value

nKey return Value

Postby areang » Wed Oct 18, 2006 6:56 am

Hi All !

How to get nKey return value of Alt+F1, Ctrl+F1 and Shift+F1

Thanks

Best Regard
Areang
areang
 
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Re: nKey return Value

Postby Enrico Maria Giordano » Wed Oct 18, 2006 7:24 am

This is a sample for Ctrl+F1 and Shift+F1:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVar := SPACE( 30 )

    SETKEY( VK_F1, { || Keys() } )

    DEFINE DIALOG oDlg

    @ 1, 1 GET cVar OF oDlg

    @ 3, 1 BUTTON "&Close" OF oDlg ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION KEYS()

    IF GETKEYSTATE( VK_CONTROL )
        ? "CTRL-F1"
    ENDIF

    IF GETKEYSTATE( VK_SHIFT )
        ? "SHIFT-F1"
    ENDIF

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby James Bott » Wed Oct 18, 2006 7:08 pm

Areang,

I believe the Alt keys are reserved for Windows (menus and hot-keys).

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Natter and 77 guests