1 / 7
文档名称:

vb上机程序设计题题解.doc

格式:doc   大小:119KB   页数:7页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

vb上机程序设计题题解.doc

上传人:jianjian401 2017/7/24 文件大小:119 KB

下载得到文件列表

vb上机程序设计题题解.doc

文档介绍

文档介绍:上机程序设计题题解
加法器
Private Sub Form_Load()
= 1
= 1
= 1
=True
End Sub
Private mand1_Click()
= Str(Val() + Val())
End Sub
Private mand2_Click()
= ""
= ""
= ""

End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub
健康称
Private Sub Form_Load()
= "健康称"
= 1
= 1
= 3
= 3
End Sub
Private mand1_Click()
Dim sg As Integer, tz As Integer, bz As Integer
sg = Val()
tz = Val ()
bz = sg - 105
If tz/ bz >= Then
= "偏胖,注意节俭!"
ElseIf tz / bz <= Then
= "偏瘦,增加营养!"
Else
= "正常。继续保持!"
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0:
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0:
End S