模拟按下ctrl_end键,请高手详加指点,先行谢过(50分)

  • 主题发起人 主题发起人 zanpen2001
  • 开始时间 开始时间
Z

zanpen2001

Unregistered / Unconfirmed
GUEST, unregistred user!
如题,我想模拟按下ctrl+end键,希望大家能帮我一下。这个程序可是为女友写的!大家都知道<br>做我们这行的找对像不容易,帮帮忙吧,不帮忙也UP一下!谢谢!
 
朋友,搜索一下“模拟按键”肯定出来一大堆,看你也不容易,帮你找出来:<br><br>procedure CtrlEnd;<br>begin<br>&nbsp; keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), 0, 0);<br>&nbsp; keybd_event(VK_End, MapVirtualKey(VK_End, 0), 0, 0);<br>&nbsp; keybd_event(VK_End, MapVirtualKey(VK_End, 0), KEYEVENTF_KEYUP, 0);<br>&nbsp; keybd_event(VK_Control, MapVirtualKey(VK_Control, 0), KEYEVENTF_KEYUP, 0);<br>end;<br>
 
procedure PressSysKey(VSysKey, VKey: Byte);<br>begin<br>&nbsp; Keybd_event(VSysKey, 0, 0, 0);<br>&nbsp; Keybd_event(VKey, 0, 0, 0);<br>&nbsp; Keybd_event(VKey, 0, KEYEVENTF_KEYUP, 0);<br>&nbsp; Keybd_event(VSysKey, 0, KEYEVENTF_KEYUP, 0);<br>end;<br><br>然后再调用<br>presssyskey(VK_CONTROL,VK_END);
 
这是模仿crtl+V的自己再改改吧,看在你女朋友的面子上帮你搜了一下:)<br>keybd_event(VK_CONTROL, MapVirtualKey(VK_CONTROL,0), 0,0);<br>keybd_event(byte('v'), MapVirtualKey(byte('v'),0), 0,0);<br>keybd_event(byte('v'),MapVirtualKey(byte('v'),0), KEYEVENTF_KEYUP,0);<br>keybd_event( VK_CONTROL, MapVirtualKey(VK_CONTROL,0),KEYEVENTF_KEYUP,0);
 
谢谢兄弟们帮忙,今晚我又可以一亲芳泽了!!!
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部