发送“进入”到text1.text [英] sending "enter" to text1.text

查看:63
本文介绍了发送“进入”到text1.text的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要这个:


当我按下commandbutton1,然后程序应该发送按键

" enter" to text1.text ...我该怎么做?

I want this:

when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?

推荐答案

*" Sven" < f是氟烃基; scripsit:
* "Sven" <f> scripsit:
当我按下commandbutton1时,程序应发送按键
输入按钮to text1.text ...我该怎么做?
when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?




查看''SendKeys''类及其''Send''方法。


-

Herfried K. Wagner [MVP]

< http://www.mvps.org/dotnet>



Have a look at the ''SendKeys'' class and its ''Send'' method.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


你好Herfried


谢谢


你熟悉.NET CF吗?太?我为我的

智能手机和pocketpcs编程了一些程序!


Sven


" Herfried K. Wagner [MVP] QUOT; <喜*************** @ gmx.at> schrieb im Newsbeitrag

新闻:%2 *************** @ TK2MSFTNGP11.phx.gbl ...
Hi Herfried

Thanks

Are you familiar with the .NET CF too? I am programming some programs for my
smartphone and pocketpcs!

Sven

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP11.phx.gbl...
*"斯文" < f是氟烃基; scripsit:
* "Sven" <f> scripsit:
当我按下commandbutton1时,程序应发送按键
输入按钮to text1.text ...我该怎么做?
when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?



看看''SendKeys''类及其''Send''方法。

-
Herfried K. Wagner [MVP]
< http://www.mvps.org/dotnet>



Have a look at the ''SendKeys'' class and its ''Send'' method.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>



如果Asc(e.KeyChar)= 13那么


''将代码放在这里


结束如果


把它放在文本框的按键子中,应该可以工作。


稍后。


" Sven" < f是氟烃基;在留言新闻中写道:在************** @ TK2MSFTNGP09.phx.gbl ...
If Asc(e.KeyChar) = 13 Then

'' Place code here

End If

Put that in thje keypress sub of the textbox, should work then.

Later.

"Sven" <f> wrote in message news:On**************@TK2MSFTNGP09.phx.gbl...
我想要这个:

什么时候我按下commandbutton1,然后程序应该发送按键
输入 to text1.text ...我该怎么做?
I want this:

when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?



这篇关于发送“进入”到text1.text的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆