VB中,在text2中输入后按回车没反应,只有“咚”?
来源:百度知道 编辑:UC知道 时间:2024/07/04 02:21:57
(题目:简单加法,例如1+2=3)
Private Sub Text1_LostFocus()
If Not IsNumeric(Text1) Then
Text1 = ""
Text1.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Not IsNumeric(Text2) Then
Text2 = ""
End If
End If
End Sub
Private Sub Text3_GotFocus()
Text3 = Val(Text1) + Val(Text2)
End Sub
Private Sub Text1_LostFocus()
If Not IsNumeric(Text1) Then
Text1 = ""
Text1.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Not IsNumeric(Text2) Then
Text2 = ""
End If
End If
End Sub
Private Sub Text3_GotFocus()
Text3 = Val(Text1) + Val(Text2)
End Sub
正确代码:
Private Sub Text1_LostFocus()
If Not IsNumeric(Text1) Then
Text1 = ""
Text1.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Not IsNumeric(Text2) Then
Text2 = ""
End If
End If
End Sub
Private Sub Text3_GotFocus()
Text3 = Val(Text1) + Val(Text2)
End Sub
VB悬赏100分用VB编解任意一元二次方程,有两个TEXT框,TEXT1里输入方程,点击OK后TEXT2中显示方程的根
vb 中怎么把在text1选中的文本复制到text2中?用seltext
VB6.0中在text1中输入一个数单击Command1按钮在另一个text2里显示另一个数?
7) 。新建一个工程,实现功能限制:在Text1中只能输入10个字母,超过的在Text2中显示。保存。
如何在VB中输入公式
在vb程序中输入俄文!
请问VB中text1.selstart=len(text2.text)是什么意思啊?
在VB中,如何在datagrid控件中输入数据?
VB6.0中TEXT1输入123456单击控件TEXT2显示abcd
!!!vb比较字符串的问题。有三个text,一个按钮,如何在text3中显示text1和text2中文本不同的地方呢?