🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #2234

VB6 Wie kan me helpen met m'n activeX control ?

#2234
From: Yellow Bird
Date: Tue, 17 Aug 2004 18:29
92 lines
4450 bytes
Hallo,

Met mijn eerste zelfgemaakte activeX control zit ik in de knoop.
Het control bevat een listbox en een tekstbox.
Na het invoeren van de properties met de activeX Control interface wizard en
het testen van het programma,
krijg ik deze foutmelding 'Invalid property array index'.
De regel waar de fout in voorkomt is aangeduid.
Daar ik nog niet lang bezig ben met VB6 en dit m'n eerste control is zit ik
een beetje met de handen in het haar.
Is er iemand die me weer op weg kan helpen ?

Alvast bedankt ?

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lstBox,lstBox,-1,AddItem
Public Sub AddItem(ByVal Item As String, Optional ByVal Index As Variant)
    lstBox.AddItem Item, Index
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lstBox,lstBox,-1,ItemData
Public Property Get ItemData(ByVal Index As Integer) As Long
    ItemData = lstBox.ItemData(Index)
End Property

Public Property Let ItemData(ByVal Index As Integer, ByVal New_ItemData As
Long)
    lstBox.ItemData(Index) = New_ItemData
    PropertyChanged "ItemData"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lstBox,lstBox,-1,List
Public Property Get List(ByVal Index As Integer) As String
    List = lstBox.List(Index)
End Property

Public Property Let List(ByVal Index As Integer, ByVal New_List As String)
    lstBox.List(Index) = New_List
    PropertyChanged "List"
End Property


'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lstBox,lstBox,-1,ListIndex
Public Property Get ListIndex() As Integer
    ListIndex = lstBox.ListIndex
End Property

Public Property Let ListIndex(ByVal New_ListIndex As Integer)
    lstBox.ListIndex() = New_ListIndex
    PropertyChanged "ListIndex"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lstBox,lstBox,-1,NewIndex
Public Property Get NewIndex() As Integer
    NewIndex = lstBox.NewIndex
End Property

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Dim Index As Integer

'TO DO: The member you have mapped to contains an array of data.
'   You must supply the code to persist the array.  A prototype
'   line is shown next:
    lstBox.ItemData(Index) = PropBag.ReadProperty("ItemData" & Index, 0)
' <<<<  Op deze regel komt de foutmelding <<<<<<<<<<<<<<<<<<<<<<<<<<
'TO DO: The member you have mapped to contains an array of data.
'   You must supply the code to persist the array.  A prototype
'   line is shown next:
    lstBox.List(Index) = PropBag.ReadProperty("List" & Index, "")
    lstBox.ListIndex = PropBag.ReadProperty("ListIndex", 0)
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Dim Index As Integer

'TO DO: The member you have mapped to contains an array of data.
'   You must supply the code to persist the array.  A prototype
'   line is shown next:
    Call PropBag.WriteProperty("ItemData" & Index, lstBox.ItemData(Index),
0)
'TO DO: The member you have mapped to contains an array of data.
'   You must supply the code to persist the array.  A prototype
'   line is shown next:
    Call PropBag.WriteProperty("List" & Index, lstBox.List(Index), "")
    Call PropBag.WriteProperty("ListIndex", lstBox.ListIndex, 0)
End Sub
Technical Details
Message-ID: <N7sUc.216988$x91.10581124@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!skynet.be!skynet.be!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,709a9e5c402e72f0,start
X-Google-Thread: 107324,709a9e5c402e72f0,start
X-Google-Attributes: gidfcea4,gid107324,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!skynet.be!skynet.be!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: "Yellow Bird" <Yellow.Bird@pandora.be>
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: VB6 Wie kan me helpen met m'n activeX control ?
Lines: 95
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <N7sUc.216988$x91.10581124@phobos.telenet-ops.be>
Date: Tue, 17 Aug 2004 18:29:01 GMT
NNTP-Posting-Host: 81.82.171.249
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1092767341 81.82.171.249 (Tue, 17 Aug 2004 20:29:01 MEST)
NNTP-Posting-Date: Tue, 17 Aug 2004 20:29:01 MEST
Organization: Telenet Internet