11智能在线
新记
VB 编写程序,先将文本框(Text1)中输入的数值赋予变量X,然后在结论便签(Ladel1)中显示X是,正数负,数还是
如题所述
举报该文章
相关建议 2017-04-21
Private Sub Text1_Change()
If IsNumeric(Text1.Text) Then
x = Val(Text1.Text)
If x >0 Then
Label1.Caption = "正数"
ElseIf x < 0 Then
Label1.Caption = "负数"
Else
Label1.Caption = "零"
End If
Else
Label1.Caption = ""
End If
End Sub
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/svqs4qp2s8vp448qs2.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
用vb编写——从文本框(text1)输入一个n,在文本框(t...
用vb编写程序,在文本框(text1)中输入一段文本,单机“...
高二信息技术题:编写vb程序,实现如下功能,在文本框text...
VB编程题,在文本框Text1中输入一个正整数,单击Comm...
编写VB程序,根据用户在文本框text1中输入的字符串,统计...
用VB编写程序,在文本框1中输入一段文本,单击“统计”按钮,...
VB:用户在Text文本框中输入的数据是什么类型的?
怎样用vb编程使在文本框中输入的秒数,单击命令按钮后转换成时...