Delphi模拟按键,将虚拟键转换为扫描码,模拟鼠标右键和左键以及发送消息的功能,Shift和Ctrl都定义了特殊的功能,一个简单的键盘鼠标模拟程序,适合Delphi初学者。比如模拟点击鼠标左键,具体的代码编写为:   begin   pt:=edit1.ClientToScreen(Point(4,4));   SetCursorPos(pt.x,pt.y);   mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);   mouse_event(MOUSEEVENTF_LEFTUP,0,0,0