问题描述
PublicClassForm1PrivateDeclareSubSleepLib"kernel32"(ByValdwMillisecondsAsInteger)PrivateDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValbScanAsByte,ByValdwFlagsAsInteger,ByValdwExtraInfoAsInteger)PrivateDeclareFunctionSetCursorPosLib"User32"(ByValxAsInteger,ByValyAsInteger)AsBooleanPrivateDeclareSubmouse_eventLib"user32"(ByValdwFlagsAsInteger,ByValdxAsInteger,ByValdyAsInteger,ByValcButtonsAsInteger,ByValdwExtraInfoAsInteger)PrivateConstMOUSEEVENTF_rightdown=&H10PrivateConstMOUSEEVENTF_rightup=&H1PrivateConstMOUSEEVENTF_LEFTDOWN=&H2PrivateConstMOUSEEVENTF_LEFTUP=&H4PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.ClickSleep(5000)SetCursorPos(500,500)mouse_event(MOUSEEVENTF_rightdown,0,0,0,0)mouse_event(MOUSEEVENTF_rightup,0,0,0,0)Sleep(5000)SetCursorPos(1000,500)Callkeybd_event(27,0,0,0)mouse_event(MOUSEEVENTF_rightdown,0,0,0,0)mouse_event(MOUSEEVENTF_rightup,0,0,0,0)EndSubEndClass
解决方案
解决方案二:
望高手能指点迷津!!!
解决方案三:
keybd_event好像也要带参数的指明是KEY_DOWN,KEY_UP
解决方案四:
还是没人鸟啊!
解决方案五:
用SendKeys.Send,不需要用API
解决方案六:
解决方案七:
引用5楼xxxxing的回复:什么问题?
解决方案八:
引用6楼hjkjhk567567的回复:
Quote: 引用5楼xxxxing的回复:什么问题?
你点进去看这个帖子的内容