如图,求详细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
--
2022-12-05 广告
2022-12-05 广告
图形化编程简单理解为用积木块形式编程,scratch和python也是其中的一种,属于入门级编程,以其简单生动的画面获得无数学生的喜爱,深圳市创客火科技有限公司是一家做教育无人机的公司,旗下有编程无人机,积木无人机及室内外编队,每款飞机含有...
点击进入详情页
本回答由--提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询