vickly 2005年03月21日
各位GGJJ看看我的两次模拟Ctrl+V,有什么问题?~~~~~~~~急,在线等
keybd_event(VK_INSERT ,mapvirtualkey(VK_INSERT ,0),0,0);//Insert
keybd_event(VK_INSERT ,mapvirtualkey(VK_INSERT ,0),keyeventf_keyup,0);
ClipBoard.Open;
Clipboard.AsText:='123';
keybd_event( VK_Control, MapVirtualKey( VK_Control, 0 ), 0, 0 ); //CTRL+V
keybd_event( ord( 'V' ), MapVirtualKey( ord( 'V' ), 0 ), 0, 0 );
keybd_event( ord( 'V' ), MapVirtualKey( ord( 'V' ), 0 ), KEYEVENTF_KEYUP, 0 );
keybd_event( VK_Control, MapVirtualKey( VK_Control, 0 ), KEYEVENTF_KEYUP, 0 );
Clipboard.Clear;
Clipboard.Close;

keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), 0, 0 ); //Alt+N
keybd_event( ord( 'N' ), MapVirtualKey( ord( 'N' ), 0 ), 0, 0 );
keybd_event( ord( 'N' ), MapVirtualKey( ord( 'N' ), 0 ), KEYEVENTF_KEYUP, 0 );
keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), KEYEVENTF_KEYUP, 0 );

Sleep(1000);
Clipboard.Open;
Clipboard.AsText:='456';
keybd_event( VK_Control, MapVirtualKey( VK_Control, 0 ), 0, 0 ); //CTRL+V
keybd_event( ord( 'V' ), MapVirtualKey( ord( 'V' ), 0 ), 0, 0 );
keybd_event( ord( 'V' ), MapVirtualKey( ord( 'V' ), 0 ), KEYEVENTF_KEYUP, 0 );
keybd_event( VK_Control, MapVirtualKey( VK_Control, 0 ), KEYEVENTF_KEYUP, 0 );
Clipboard.Clear;
Clipboard.Close;

现在的情况是都没有贴上去啊~~~help me!
...全文
35 点赞 收藏 4
写回复
4 条回复

还没有回复,快来抢沙发~

发动态
发帖子
非技术区
创建于2007-08-02

587

社区成员

5.4w+

社区内容

Delphi 非技术区
社区公告
暂无公告