① 能不能用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