Thread View: be.comp.programming
1 messages
1 total messages
Started by Yellow Bird
Tue, 17 Aug 2004 18:29
VB6 Wie kan me helpen met m'n activeX control ?
Author: Yellow Bird
Date: Tue, 17 Aug 2004 18:29
Date: Tue, 17 Aug 2004 18:29
92 lines
4450 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads