作者在 2010-03-07 21:14:37 发布以下内容
var
wh:hwnd;
begin
wh:=findWindow(nil,'追影虚拟多桌面');
//把记事本窗口激活
SetForegroundWindow(wh); //设置当前窗口为活动窗口
keybd_event(VK_CONTROL,0,KEYEVENTF_EXTENDEDKEY or 0,0);
keybd_event(76,0,KEYEVENTF_EXTENDEDKEY or 0,0);
sleep(1000);
keybd_event(76,0,KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP,0);
keybd_event(VK_CONTROL,0,KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP,0);
//发送消息ctrl +L的组合键
end;