各位学长、朋友好!想请教一道vb的题,希望大家能够给我详细解答一下,不胜感激、、、、
PrivateSubForm_Load()Text1.Text=””Text2.Text=””EndSubPrivateSubText1_KeyDown(KeyCodeA...
Private Sub Form_Load()
Text1. Text=””
Text2. Text=””
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
S2=s2 & Chr(KeyCode)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
S1=S1 & chr(KeyAscii)
End Sub
Private Sub Command1_Click()
Text1.Text=S2
Text2.Text=S1
S1=""
S2=""
End Sub
程序运行后,在Text1中输入"abc",然后单击命令按钮,在文本框 Text1 和 Text2 中显示的内容分别为( )。
A.abc 和 ABC
B.abc 和 abc
C.ABC 和 abc
D.ABC 和 ABC 展开
Text1. Text=””
Text2. Text=””
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
S2=s2 & Chr(KeyCode)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
S1=S1 & chr(KeyAscii)
End Sub
Private Sub Command1_Click()
Text1.Text=S2
Text2.Text=S1
S1=""
S2=""
End Sub
程序运行后,在Text1中输入"abc",然后单击命令按钮,在文本框 Text1 和 Text2 中显示的内容分别为( )。
A.abc 和 ABC
B.abc 和 abc
C.ABC 和 abc
D.ABC 和 ABC 展开
3个回答
展开全部
应该是C
但是这个程序可能少了两句赋值语句
Dim s1 As String
Dim s2 As String
KeyCode是大写字母
这个答案我拿VB6.0试过了
程序注释
Private Sub Form_Load() '初始化text1和text2清空
Text1. Text=””
Text2. Text=””
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)'text1按下任意按键时触发
S2=S2 & Chr(KeyCode) 's2存按下键的Keycode 值,详见可以查MSDN
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
S1=S1 & chr(KeyAscii) 's1存按下键的keyACsii值
End Sub
Private Sub Command1_Click()
Text1.Text=S2‘text1显示S2
Text2.Text=S1 ’text2显示s1
S1="" 显示后清空是S1和S2
S2=""
End Sub
但是这个程序可能少了两句赋值语句
Dim s1 As String
Dim s2 As String
KeyCode是大写字母
这个答案我拿VB6.0试过了
程序注释
Private Sub Form_Load() '初始化text1和text2清空
Text1. Text=””
Text2. Text=””
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)'text1按下任意按键时触发
S2=S2 & Chr(KeyCode) 's2存按下键的Keycode 值,详见可以查MSDN
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
S1=S1 & chr(KeyAscii) 's1存按下键的keyACsii值
End Sub
Private Sub Command1_Click()
Text1.Text=S2‘text1显示S2
Text2.Text=S1 ’text2显示s1
S1="" 显示后清空是S1和S2
S2=""
End Sub
展开全部
Dim s1
Dim s2
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
s2 = s2 & Chr(KeyCode)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
s1 = s1 & Chr(KeyAscii)
End Sub
Private Sub Command1_Click()
Text1.Text = s2
Text2.Text = s1
s1 = ""
s2 = ""
End Sub
Dim s2
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
s2 = s2 & Chr(KeyCode)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
s1 = s1 & Chr(KeyAscii)
End Sub
Private Sub Command1_Click()
Text1.Text = s2
Text2.Text = s1
s1 = ""
s2 = ""
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
答案为:c
输入为大写则输出为大写,小写则转大写
输入为大写则输出为大写,小写则转大写
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询