如图,求详细VB语言
展开全部
Private Sub Command1_Click()
If List1.ListIndex = 0 Or List1.ListIndex = -1 Then Exit Sub
List1.AddItem (List1.Text), List1.ListIndex - 1
List1.RemoveItem (List1.ListIndex)
End Sub
Private Sub Command2_Click()
If List1.ListIndex = List1.ListCount - 1 Or 败禅List1.ListIndex = -1 Then Exit Sub
List1.AddItem (List1.Text), List1.ListIndex + 2
List1.RemoveItem (List1.ListIndex)
End Sub
Private Sub Command3_Click()
If Text2 = "" Then Exit Sub
If Val(Text2) > List1.ListCount Then
MsgBox "歌曲排名" & Text1 & ",超过歌曲总数" & CStr(List1.ListCount)
Exit Sub
End If
List1.AddItem Text1, Val(Text2)
End Sub
Private Sub Command4_Click()
If List1.Text = "" Then Exit 腔瞎Sub
List1.RemoveItem (List1.ListIndex)
End Sub
Private Sub Command5_Click()
List1.Clear
Text1 = ""
Text2 = ""
End Sub
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Caption 伍枯空= "周歌曲排行榜"
Label1.Caption = "Top10"
Label2.Caption = "新歌入榜"
Label3.Caption = "名次"
List1.AddItem "伤不起"
List1.AddItem "荷塘月色"
List1.AddItem "想象之中"
Text1 = ""
Text2 = ""
Command1.Caption = "↑"
Command2.Caption = "↓"
Command3.Caption = "←"
Command4.Caption = "→"
Command5.Caption = "清除"
Command6.Caption = "结束"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询