Click here to Skip to main content
16,016,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
paste cliboard to textbox where keyboard is focused, please help?
Posted

1 solution

Assuming this is winforms, or C# has no access to the user clipboard anyway:
C#
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!)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900