谁会做VB的题目啊??比如:

来源:百度知道 编辑:UC知道 时间:2024/05/26 05:43:06
程序包括:3个标签框,1个列表框,2个文本框和2个命令按钮。利用循环语句和InputBox函数输入10个整数,将它们记录在列表框中,同时求解出最大值和最小值,分别显示在相应的文本框中。双击列表框中的某一数字,能够删除该数字,其他数字同时再求解最大值和最小值,重新分别显示在相应的文本框中。
要求:1、循环语句。
2、InputBox函数。
3、最大值和最小值的求解。
4、双击列表框中的某一数字,能够删除该数字。
5、“结束”按钮退出应用程序。
在这里我要衷心的感谢"VB妮可"和"伊人尤在",特别的"伊人尤在"对我进行了细心的指导,可以说是不厌其烦,我都怕他以为我只是让他帮我做题,而不会给他分,,但他每次都帮了我,而且每次都很及时,我真的很感动!另外我还有2题,希望大家能够帮帮我,http://zhidao.baidu.com/question/40097176.html,(20分啊!)我提前谢谢大家!!!我再次申明我是一个菜鸟,所以如果你们认为我问的问题简单了,请不要鄙视我!呵呵!!

Private Sub Command1_Click()
For i = 1 To 10
List1.AddItem InputBox("输入第" & i & "个整数")
Next i
Call fd_max_min(List1, themax, themin)
Text1.Text = "最大值:" & themax & Chr(9) & "最小值:" & themin
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Command1.Caption = "输入"
Command2.Caption = "结束"
End Sub

Private Sub fd_max_min(lst As ListBox, themax, themin)
themin = Val(List1.List(0))
themax = Val(List1.List(0))

For i = 0 To lst.ListCount - 1
If CInt(lst.List(i)) > themax Then themax = CInt(lst.List(i))
If CInt(lst.List(i)) < themin Then themin = CInt(lst.List(i))
Next i
End Sub

Private Sub List1_DblClick()
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then