VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1545
   ClientLeft      =   5880
   ClientTop       =   4320
   ClientWidth     =   3105
   LinkTopic       =   "Form1"
   ScaleHeight     =   1545
   ScaleWidth      =   3105
   Begin VB.TextBox Text1 
      Height          =   330
      Left            =   1710
      TabIndex        =   2
      Top             =   75
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Get It"
      Height          =   360
      Left            =   225
      TabIndex        =   1
      Top             =   1095
      Width           =   1230
   End
   Begin VB.ListBox List1 
      Height          =   840
      Left            =   30
      TabIndex        =   0
      Top             =   60
      Width           =   1620
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim GetCommand As New CCommandLine
Private Sub Command1_Click()
    List1.Clear
    
    Dim iArgumentsCount As Integer
    Dim i As Integer
    iArgumentsCount = GetCommand.CountArguments
    List1.AddItem "Count = " & iArgumentsCount
    For i = 1 To iArgumentsCount
        List1.AddItem GetCommand.GetArgumentName(i)
    Next

End Sub

Private Sub List1_Click()
    If List1.ListIndex > 0 Then
        Text1 = GetCommand.GetArgumentValue(List1.ListIndex)
    Else
        Text1 = ""
    End If
End Sub
