通过系统键盘缓冲区传输数据? (VFP9)
使用 Visual FoxPro 9 可执行文件 (EXE),我需要能够将数据放入系统键盘缓冲区,然后由另一个程序(非 FoxPro)拾取该数据。我已经尝试过使用 KEYBOARD 命令,但是,它似乎只适用于 FoxPro 应用程序中的字段和控件!有谁对如何实现这一点有任何想法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要调用 Win32 API - keybd_event 可能是您想要的调用 SendInput 使用结构体,这在 VFP 中是一个痛苦的问题。有示例代码这里。
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.
您的意思是复制到剪贴板吗?如果是这样,这里有两种方法。第一个示例将字符串复制到剪贴板。第二个示例将表/光标复制到剪贴板。
_cliptext = "测试"
_vfp.DataToClip(SELECT(ALIAS()), RECCOUNT() + 1, 3)
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)