老师,如果我在TextBox1 后面加了空格,可以屏蔽这个空格吗,就是如果TextBox1的最后一个字符是空格,Label1没有空格,也视为相同,执行蓝色的代码。感谢 感谢
Dim lbl1 As WinForm.Label = e.Form.Controls("Label1")
Dim txt1 As WinForm.TextBox = e.Form.Controls("TextBox1")
If txt1.text = "" Then '如果TextBox1没有字符,执行下面代码
Forms("听写小窗口").Controls("Button10").PerformClick
'Dim sp As New DotNetSpeech.SpVoice()
'sp.Speak(e.Form.Controls("Label1").Text, DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)
Else
If lbl1.text <> txt1.text Then
Forms("听写小窗口").Controls("Button3").PerformClick
'Audio.Play("Z:\yinxiao\5312.wav")
msgbox("不匹配")
Forms("听写小窗口").Controls("Button10").PerformClick
'Dim sp As New DotNetSpeech.SpVoice()
'sp.Speak(e.Form.Controls("Label1").Text, DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)
Else
If lbl1.text = txt1.text Then
Dim t As Table = Tables("单词")
'Dim ar As Row = t.current
'ar("目录_状态") = "已学习"
t.Current("听写_次数") += 1