① 能不能用vb寫一個小程序,把滑鼠的移動映射到鍵盤按鍵
'在窗口添加個Timer控制項,
"user32"(lpPointAsPOINTAPI)AsLong
PrivateTypePOINTAPI
xAsLong
yAsLong
EndType
DimTxAsLong,TyAsLong,PAsPOINTAPI
SubForm_Load()
Timer1.Enabled=True
Timer1.Interval=100
GetCursorPosP
Tx=P.x
Ty=P.y
EndSub
PrivateSubTimer1_Timer()
Dimttx,tty
GetCursorPosP
ttx=Tx-P.x
tty=Ty-P.y
Ifttx>0Then
SendKeys"{LEFT}"
ElseIfttx<0Then
SendKeys"{RIGHT}"
EndIf
Iftty>0Then
SendKeys"{UP}"
ElseIftty<0Then
SendKeys"{down}"
EndIf
Tx=P.x
Ty=P.y
EndSub