Subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo )
library "user32.dll" //貌似不用这个也可以
自定义 pbm_dwnkey 事件 【 注意:不是pbm_keydown】
choose case key
case keyenter!
if This.getRow() = this.rowCount() then
This.insertrow(0)
This.scrolltorow(This.getrow()+1)
This.Setcolumn(1)
end if
return 1
case KeyLeftArrow!
if This.getcolumn() = 1 and This.getRow()<>1 then
This.scrolltorow(This.getrow()-1)
This.Setcolumn(Long(This.Describe("Datawindow.Column.count")))
else
This.Setcolumn(This.getcolumn()-1)
end if
return 1
case KeyRightArrow!
if This.getcolumn()=Long(This.Describe("Datawindow.Column.count"))
then
if this.getrow()=This.Rowcount() then
This.insertrow(0)
This.scrolltorow(This.getrow()+1)
This.Setcolumn(1)
return
end if
end if
send(Handle(this),256,9,long(0,0))
return 1
case keyUpArrow!
// if This.getcolumn() <> 1 then
// this.sertRow(this.getRow()-1)
// end if
// return 1
case keydownArrow!
// if This.getRow() <> this.rowCount() then
//
// end if
// return 1
end choose