在很多比赛上,计分牌是很重要的软件.它的主要功能是
运动员入场,评委亮出他的分数,记分牌上面显示当前已经上场所有运动员的得分,并排序
但它不是普通的排序,格式如下:
9.123
-0.012
-0.024
大家帮帮忙吧!!!以下是别人编写的,但是我写进去却不行,一直提示"listcount"不是"system windows.forms.listbox"的成员
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4035
ClientLeft = 60
ClientTop = 450
ClientWidth = 5370
LinkTopic = "Form1"
ScaleHeight = 4035
ScaleWidth = 5370
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "添加"
Default = -1 'True
Height = 375
Left = 2520
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Left = 2520
TabIndex = 0
Top = 240
Width = 1335
End
Begin VB.ListBox List1
Height = 2940
ItemData = "Form1.frx":0000
Left = 240
List = "Form1.frx":0002
TabIndex = 2
Top = 240
Width = 1935
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim m As Integer
Dim sum As Single
For m = 0 To List1.ListCount - 1
sum = sum + Val(List1.List(m))
Next
List1.AddItem Format(Val(Text1.Text) - sum, "0.000")
End Sub