将文本发送到在另一个应用程序中重点的编辑文本
我的表单是最上方= true
,有一个按钮。我希望,当我单击另一个应用程序中的文本字段并单击“示例”文本到具有光标焦点的控件时。
但是,我只能通过不将焦点从组件中焦点进行焦点的事件来做到这一点
private void button1_MouseHover(object sender, EventArgs e)
{
SendKeys.Send("test");
}
,我有任何方法可以单击按钮将文本设置在具有焦点的控件上吗?类似于Windows win + v
I have a form that is TopMost = true
, which has a button. I want that when I click on the text field in another application and click on the button it sends an 'example' text to the control that has cursor focus.
but I was only able to do this with the onHover event that doesn't take the focus off the component
private void button1_MouseHover(object sender, EventArgs e)
{
SendKeys.Send("test");
}
is there any way for me to click the button to set the text on the control that has focus? similar to windows Win+V
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论