VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5940
ClientLeft = 60
ClientTop = 345
ClientWidth = 7545
LinkTopic = "Form1"
ScaleHeight = 5940
ScaleWidth = 7545
StartUpPosition = 3 'Windows Default
Begin VB.ListBox List1
Height = 2790
Index = 4
Left = 5700
TabIndex = 3
Top = 135
Width = 1785
End
Begin VB.ListBox List1
Height = 2790
Index = 3
Left = 3825
TabIndex = 2
Top = 150
Width = 1785
End
Begin VB.ListBox List1
Height = 2790
Index = 2
Left = 1890
TabIndex = 1
Top = 165
Width = 1785
End
Begin VB.ListBox List1
Height = 2790
Index = 1
Left = 60
TabIndex = 0
Top = 180
Width = 1785
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'Since I use VB5 I made my own replace,split command in a DLL
Dim rep As replace
Set rep = New replace
Dim netstatline As String
'Read first lines (header)
Open "c:\a.txt" For Input As 1
For i = 1 To 4
Line Input #1, vars
Next i
Do
Line Input #1, netstatline
tmpvar = rep.Split(netstatline, " ")
columnnumber = 0
For i = 1 To UBound(tmpvar)
If tmpvar(i) <> "" Then
columnnumber = columnnumber + 1
List1(columnnumber).AddItem tmpvar(i)
End If
Next i
Loop Until EOF(1)
End Sub