本文介绍了将cliboard粘贴到键盘所在的文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
将cliboard粘贴到键盘所在的文本框中,请帮忙?
paste cliboard to textbox where keyboard is focused, please help?
推荐答案
void myTimer_Tick(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
TextBox tb = ActiveControl as TextBox;
if (tb != null)
{
tb.Text = Clipboard.GetText();
}
}
(显然,这不能通过按钮点击或任何其他控件来完成!)
(Obviously, this can''t be done from a button click or any other control!)
这篇关于将cliboard粘贴到键盘所在的文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!