请问如何用API改变键盘速度?(100分)

  • 主题发起人 主题发起人 wzisme
  • 开始时间 开始时间
W

wzisme

Unregistered / Unconfirmed
GUEST, unregistred user!
就是像控制面板里的键盘设置一样<br>设置重复速度和重复延续时间?<br>用API函数[:(][:(]
 
注册表<br>HKEY_CURRENT_USER/Control Panel/Keyboard
 
systemParametersInfo()<br>SPI_SETKEYBOARDSPEED Sets the keyboard repeat-speed setting.<br>&nbsp;The uiParam parameter must specify a value in the range <br>from 0 (approximately 2.5 repetitions per second) through 31 <br>(approximately 30 repetitions per second). The actual repeat <br>rates are hardware-dependent and may vary from a linear scale<br>&nbsp;by as much as 20%. If uiParam is greater than 31, <br>the parameter is set to 31. <br>
 
systemParametersInfo()函数我知道<br>就是不知怎样设置pvpram,fwinini参数等等<br>给个例子好不好?大侠!![:(]
 
&nbsp;systemParametersInfo(SPI_SETKEYBOARDSPEED,16,Nil,SPIF_UPDATEINIFILE)<br>16为设置的速度,它的取值范围为0-31<br>pvpram设为nil就行;<br>fwinini有三个值<br>SPIF_UPDATEINIFILE Writes the new system-wide parameter setting to the user profile.<br>SPIF_SENDCHANGE Broadcasts the WM_SETTINGCHANGE message after updating the user profile.<br>SPIF_SENDWININICHANGE Same as SPIF_SENDCHANGE.<br>我取了第一个值<br>你把这行代码加入到一个button onclick事件中,然后运行后,你再打开控制面板去看键盘<br>设置有什么变化。
 
键盘的重复速度已经调整<br>谢谢!<br>但重复的延续时间如何调呢??<br>答对了给分,否则给一半
 
&nbsp;systemParametersInfo(SPI_SETKEYBOARDDELAY,1,Nil,SPIF_UPDATEINIFILE)<br>uiParam取值为0-3
 
接受答案了.
 

Similar threads

D
回复
0
查看
824
DelphiTeacher的专栏
D
D
回复
0
查看
867
DelphiTeacher的专栏
D
D
回复
0
查看
836
DelphiTeacher的专栏
D
D
回复
0
查看
785
DelphiTeacher的专栏
D
后退
顶部