English 中文(简体)
Data transfer via the system keyboard buffer? (VFP9)
原标题:

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?

问题回答

You ll need to call into the Win32 API - keybd_event is probably the call you want as SendInput uses structs, which are a pain in VFP. There s sample code here.

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)





相关问题
keyboard hook in windows C++ or what?

I wish to build my own application which can send keyboard commands(messages) to the Windows OS. For example when I press the combination ctrl+shift+n, I wish to launch the notepad.exe . How can I ...

Detect if any key is pressed in C# (not A, B, but any)

[EDIT 3] I kind of "solved it" by at using the "strange" version. At least for the most important keys. It is suffient for my case, where I want to check that ALT and ALT+A are not ...

Solution for iPhone new file dialog keyboard

i want to let the user type in the name of a new file, so there are certain characters i want to prevent entry on. is there a special keyboard i can use or can i disable certain keys on the iphones ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

热门标签