#include "FiveWin.ch"
function main()
local oWnd
DEFINE WINDOW oWnd TITLE "Keys"
oWnd:bKeyDown := { | nKey | IIF( nKey = 33, MsgInfo( "Page UP : " + Str( nKey ) ), ), ;
IIF( nKey = 34, MsgInfo( "Page DOWN : " + Str( nKey ) ), ) }
ACTIVATE WINDOW oWnd
RETURN ( NIL )
STATIC FUNCTION VerKey(nKey,oBSum, oBMin, oBMol, oBDiv, oBPer, oBCan, oBRes)
if nKey == 107 // "+"
oBSum:Click()
elseif nKey == 109 // "-"
oBMin:Click()
elseif nKey == 106 // "*"
oBMol:Click()
elseif nKey == 111 // "/"
oBDiv:Click()
elseif nKey == 105
oBt9:click()
elseif nKey == 104
oBt8:click()
elseif nKey == 103
oBt7:click()
elseif nKey == 102
? chr(nkey)
oBt6:click()
elseif nKey == 101
oBt5:click()
elseif nKey == 100
oBt4:click()
elseif nKey == 99 .or. nkey== 51
oBt3:click()
elseif nKey == 98 .or. nkey== 50
oBt2:click()
elseif nKey == 97 .or. nkey== 49
oBt1:click()
end
RETU 0
#define VK_NUMPAD0 96
#define VK_NUMPAD1 97
#define VK_NUMPAD2 98
#define VK_NUMPAD3 99
#define VK_NUMPAD4 100
#define VK_NUMPAD5 101
#define VK_NUMPAD6 102
#define VK_NUMPAD7 103
#define VK_NUMPAD8 104
#define VK_NUMPAD9 105
elseif nKey == 34 //PAGE DOWN in vkey.ch
? [PAGE DOWN]
elseif nKey == 33 //PAGE UP In vkey.ch
? [PAGE UP]
elseif nKey == 105 //VK_NUMPAD9 - in vkey.ch
oBt9:click()
STATIC FUNCTION VerKey(nKey,oBSum, oBMin, oBMol, oBDiv, oBPer, ;
oBCan, oBRes, oBivap, oBIvam, oBtnPast,oBt1,oBt2,oBt3,oBt4,oBt5,oBt6,oBt7,oBt8,oBt9,oBt0)
if nKey == 107 // "+"
oBSum:Click()
elseif nKey == 109 // "-"
oBMin:Click()
elseif nKey == 106 // "*"
oBMol:Click()
elseif nKey == 111 // "/"
oBDiv:Click()
elseif nKey == 008 // BackSpace
oBtnPast:Click()
elseif nKey == 067 // C
oBCan:Click()
elseif nKey == VK_NUMPAD9
oBt9:click()
elseif nKey == VK_NUMPAD8
oBt8:click()
elseif nKey == VK_NUMPAD7
oBt7:click()
elseif nKey == VK_NUMPAD6
oBt6:click()
elseif nKey == VK_NUMPAD5
oBt5:click()
elseif nKey == VK_NUMPAD4
oBt4:click()
elseif nKey == VK_NUMPAD3
oBt3:click()
elseif nKey == VK_NUMPAD2
oBt2:click()
elseif nKey == VK_NUMPAD1
oBt1:click()
elseif nKey == VK_NUMPAD0
oBt0:click()
end
RETU 0
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 12 guests