66问答网
所有问题
设计一个只接受字母键的文本框,在文本框text1中输入一串字符时,文本框text2中就即
如题所述
举报该问题
其他回答
第1个回答 2016-05-11
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (Asc("a ") <= KeyAscii And KeyAscii <= Asc("z ") Or _
Asc("A ") <= KeyAscii And KeyAscii <= Asc("Z ")) Then
KeyAscii = 0
End If
Text2.Text = StrReverse(Text1.Text)
End Sub
追问
反序输出会少一个字母
本回答被网友采纳
相似回答
...在第
一个文本框中输入
英语单词
,在
第
二个文本框中
会自动显示汉语_百 ...
答:
new Actionlistener(){ public void actionPerformed(ActionEvent e) { if(e.getSource()==
text1
){ s=text1.getText();if(s=="red"){
text2
.setText("红色");} else if(s=="红色"){ text2.setText("red");} } } });用内部匿名类或者重新自定义一个集成ActionLister的类 .addAction...
在vb的登录窗口中,想让
文本框1中
只能
输入字母,文本框2中
只能输入数字...
答:
Private Sub
Text2
_KeyPress(KeyAscii As Integer)If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then '如果按的不是数字键 If KeyAscii <> 8 Then '如果按的不是退格键 KeyAscii = 0 '则按键无效 MsgBox "输入的必须为数字"End If End If End Sub Private Sub TextBox1_KeyPress(By...
...我想在第
一个文本框中
随意
输入字母
和数字,第
二个文本框
用来显示其中...
答:
0和9要加上双引号 If b >= "0" And b <= "9" Then
...从文本框(
text1
)
输入一个
n
,在文本框
(
text2
)中输出N!的值(要求t...
答:
num1 = Val(
Text1
.Text)sum1 = 1 '''判断If num1 <= 0 Then MsgBox "不允许输入小于等于0的数值", vbOKOnly, "提示"Text1.SetFocus Exit Sub End If If num1 <> Int(num1) Then MsgBox "请输入整数", vbOKOnly, "提示"Text1.SetFocus Exit Sub End If '求值For i = 1 To num...
VB上加了两个
文本框,
如何
在文本框1中输入
内容
文本框2就
可以显示文本框...
答:
Private Sub
Text1
_Change()
Text2
.Text = Len(Text1.Text)End Sub
VB编程:我在
Text1中输入
一组
字符
:
在Text2中
判断,下面有详细说明_百度知 ...
答:
Private Sub Command1_Click()Dim s_in As String Dim s_out As String Dim i As Integer Dim iMax As Integer Dim wchar As Integer Dim bIsNum As Boolean Dim bIs_AtoF As Boolean Dim bIsatof As Boolean Dim s_nothex As String Dim s_msg As String s_in =
Text1
.Text s_out =...
大家正在搜
在单击文本框后按什么键删除文本框
按键精灵向文本框输入文本
按键精灵输入预设文本
选择不连续文本框按哪个键
怎样为文本框设置访问键
选中不连续的文本按什么键
按键控制文本输入
键盘大写字母按哪个键
键盘上字母键出数字怎么办
相关问题
求VB代码。设计一个只接受字母键的文本框,在text1中输入...
设计一个表单,在一个文本框TEXT1中输入字符的同时,输入的...
VB编程问题:程序运行时,在文本框text1中输入1个字符串...
运行表单,在文本框text1中输入一串字符串,单击“统计”命...
一道VB综合应用题 创建一个应用程序,窗体Form1上有2个...
改错!程序运行后,在文本框TEXT1中输入一个字符串,单击命...
VB,在窗体上添加两个文本框text1和text2.要求在文...
在文本框text1中输入字符,要求在文本框text2中自动取...