C语言键盘无法打数字时怎么用程序打出来任意数字?比如10或100.

2024-11-19 10:40:28
推荐回答(2个)
回答(1):

调用 win32 API,,,,,模拟按键 keybd_event

keybd_event(9,0,0,0) #Tab
keybd_event(17,0,KEYEVENT_KEYUP,0) #Realize the Ctrl button
keybd_event(19,0,KEYEVENT_KEYUP,0) #Realize the Tab button

回答(2):

rand()函数