从其他程序文本框的文本框中输入文本 [英] Input the text from the text box in other program textbox
问题描述
你好
我需要从textbox1获取文本并将其推入其他程序文本框。
我该怎么做和什么?
我尝试了什么:
到目前为止我看到了SendKey,但是htat正在发送指定文本,我的文本将更改
Hello
I need to take a text from textbox1 and putt it in other program text box .
How can I do that and with what?
What I have tried:
so far i saw SendKey but htat is sending the specify text and my text will change
推荐答案
SendKey但是htat正在发送指定文本,我的文本将会改变
SendKey but htat is sending the specify text and my text will change
SendKeys.Send [ ^ ]发送你通过的任何字符串它:示例使用固定字符串,因为它们只是:如何使用它的示例。它们并不是关于如何完成您的任务所需的明确说明,它们是为了让您了解如何使用该方法。
无论何时方法在C#中接受字符串,它都可以接受固定字符串:
SendKeys.Send[^] sends whatever string you you pass it: the examples use a fixed string becasue they are just that: examples of how to use it. They are not explicit instructions on how to do exactly what your task requires, they are they to give you the idea how to use the method.
Wherever a method accepts a string in C#, it can accept a fixed string:
SendKeys.Send("Hello");
或包含对固定字符串的引用的变量:
Or a variable containing a reference to a fixed string:
string aVariableName = "Hello " + myTextBox.Text;
SendKeys.Send(aVariableName);
这篇关于从其他程序文本框的文本框中输入文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!