Question: Using a Visual FoxPro 9 executable file, (EXE), I need to be able to place data into the system keyboard buffer which is then to be picked up by another program, (non-FoxPro). I've already tried using the KEYBOARD command, however, that only seems to work with fields and controls within the FoxPro application! Does anyone have any ideas on how this can be accomplished?

Answer: 
You'll need to call into the Win32 API - [keybd\_event](http://msdn.microsoft.com/en-us/library/ms646304%28VS.85%29.aspx) is probably the call you want as [SendInput](http://msdn.microsoft.com/en-us/library/ms646310%28VS.85%29.aspx) uses structs, which are a pain in VFP. There's sample code [here](http://www.tech-archive.net/Archive/Fox/microsoft.public.fox.programmer.exchange/2005-05/msg00504.html).
Do you mean to copy to the clipboard? If so, here are two ways. The first example copies a string to the clipboard. The second example copies a table/cursor to the clipboard.

\_cliptext = "test"

\_vfp.DataToClip(SELECT(ALIAS()), RECCOUNT() + 1, 3)