欢迎来到天天文库
浏览记录
ID:19246606
大小:34.50 KB
页数:7页
时间:2018-09-30
《中山医vb课后题实验33》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、中山医vb课后题实验33窗体与基本控件PublicClassForm1(汽油)PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimtAsInteger,fAsSingle,xAsStringt=Val(TextBox1.Text)f=7.69*tx=Str$(f)+"元"Label2.Text=xTextBox1.Focus()EndSubPrivateSubForm1_Load(ByValsenderAsObject,
2、ByValeAsSystem.EventArgs)HandlesMe.LoadTextBox1.Text=""Label2.Text=""EndSubEndClassPublicClassForm2(体重超标)PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimxAsIntegerIfTextBox1.Text=""ThenTextBox1.Focus()'在文本框1输入身高MsgBox("请输入身高")ExitSubE
3、ndIfIfTextBox2.Text=""ThenTextBox2.Focus()'在文本框2输入体重MsgBox("请输入体重")ExitSubEndIf'选择性别IfRadioButton1.Checked=FalseAndRadioButton2.Checked=FalseThen'此种情况不会发生MsgBox("请选择被检测者性别")ExitSubEndIfIfRadioButton1.Checked=TrueThenx=Val(TextBox1.Text)-100'计算男性体重ElseIfRadioButton2.Checked=TrueThenx=V
4、al(TextBox1.Text)-105'计算女性体重EndIf'判断体重是否超标,并显示IfVal(TextBox2.Text)>xThenLabel3.Text="体重超标,请注意饮食与运动!"ElseLabel3.Text="体重正常"EndIfEndSubPrivateSubButton2_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton2.Click'清除计算体重和超标提示Label3.Text="":TextBox1.Text="":TextBox2.Tex
5、t=""RadioButton1.Checked=False:RadioButton2.Checked=FalseEndSubPrivateSubButton3_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton3.ClickEnd'结束工程运行EndSubEndClassPublicClassForm3(病例信息)DimxAsInteger,varstringAsStringPrivateSubForm1_Load(ByValsenderAsSystem.Object,B
6、yValeAsSystem.EventArgs)HandlesMyBase.LoadTextBox3.Enabled=FalseButton1.Enabled=FalseTextBox3.Font=NewFont("宋体",10,FontStyle.Regular)EndSubPrivateSubButton3_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton3.ClickEndEndSubPrivateSubButton2_Click(ByValsenderAsSyst
7、em.Object,ByValeAsSystem.EventArgs)HandlesButton2.ClickSelectCaseTrueCaseCheckBox1.Checked=TrueAndCheckBox2.Checked=FalseTextBox3.Font=NewFont("宋体",10,FontStyle.Bold)CaseCheckBox2.Checked=TrueAndCheckBox1.Checked=FalseTextBox3.Font=NewFont("宋体",10,FontStyle.Italic)CaseCheckBox1.Checke
8、dAndC
此文档下载收益归作者所有