全文预览

列车时刻表VB课程设计

上传者:upcfxx |  格式:doc  |  页数:18 |  大小:146KB

文档介绍
1) & "次"Р Lstid.ItemData(Lstid.NewIndex) = j - 1Р Exit ForР End IfР NextР End IfР NextРEnd SubРPrivate Sub cmdShowAll_Click() '显示全部车次Р Dim i As Integer, j As IntegerР Lstid.Clear '清除当前显示的车次Р For i = 1 To intNumberР Lstid.AddItem strContent(1, i) & "次" '添加车次名称Р Lstid.ItemData(Lstid.NewIndex) = i '记录列表框中每一项是所有车次中的第几项Р NextР cboQuРPrivate Sub Form_Load()Р Dim str1 As StringР Dim i As Integer, j As Integer, k As IntegerР Р Р '存入列车时刻表到数组Р Dim listР Open App.Path & "\content.txt" For Input As 1Р Do While Not EOF(1)Р intNumber = intNumber + 1Р Line Input #1, str1Р ReDim Preserve strContent(6, intNumber)Р i = InStr(str1, ",")Р strContent(1, intNumber) = Left(str1, i - 1)Р j = iР i = InStr(i + 1, str1, ",")Р strContent(2, intNumber) = Mid(str1, j + 1, i - j - 1)Р j = iР i = InStr(i + 1, str1, ",")

收藏

分享

举报
下载此文档