
90 CHAPTER 3
PCDPropertyList
'Note that this example retrieves each value 2
'times.
Public oListFormProps As New PCDPropertyList
Private Sub cbCancel_Click()
Unload ListForm
End Sub
Private Sub Form_Load()
Dim nTotalElements As Integer
Dim nResult As Long
nTotalElements = oListFormProps.GetSize
'Prime the pump by setting the index element to 0
'so program can iterate through the PCDProperties
'array.
nResult = oListFormProps.BeginIter
nTotalElements = nTotalElements * 2
'In this way we are able to go through the
'entire list of elements.
For i = 1 To nTotalElements
lstPropName.AddItem _
oListFormProps.GetCurrentPropertyName
lstPropertyValue.AddItem _
oListFormProps.GetCurrentPropertyValue
nResult = oListFormProps.NextProperty
Next i
lstPropName.ListIndex = 0
lstPropertyValue.ListIndex = 0
End Sub
Kommentare zu diesen Handbüchern