This issue occurs when Visual Basic modifies the event handler parameters that we provide, resulting in a naming conflict with Index. For example, the OnNewOPCData event should pass a single parameter named "Index". However, if you are using a control array, Visual Basic automatically inserts a parameter named "Index" which specifies which control in the array is generating this event, resulting in the duplicate name conflict...
|
Using Single Component |
|---|
|
Private Sub iAnalogOutputX1_OnNewOPCData(ByVal Index As Long) End Sub |
|
Using Control Array |
|
Private Sub iAnalogOutputX1_OnNewOPCData(Index As Integer, ByVal Index As
Long) End Sub |
To fix this issue, simply rename the Iocomp "Index" parameter to something else, such as "AIndex" for example...
| Fixed Example |
|---|
|
Private Sub iAnalogOutputX1_OnNewOPCData(Index As Integer, ByVal AIndex As
Long) End Sub |
Copyright ©1998-2007 Iocomp Software Incorporated. Iocomp and the Iocomp Logo are registered trademarks of Iocomp Software Inc. All other trademarks are registered by their respective owners.