//函数声明
//Subroutine keybd_event(int bVk , int bScan,int dwFlags, long dwExtraInfo) LIBRARY "user32" Alias FOR "keybd_event"
//在数据窗口的other事件中写入下面的代码
Constant ulong VK_UP = 38 //&H26
Constant ulong VK_DOWN = 40 //&H28
int li_key
if message.number = 522 then
if IntHigh(message.wordparm)=120 then
li_key = VK_UP
else
li_key = VK_DOWN
end if
keybd_event(li_key , 0,0, 0)
keybd_event(li_key , 0,2, 0)
end if