Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of Gauges/Graphs/Tanks

In the old component works I used to be able to have arrays of say a gauge. i.e. gauge1(0)....gauge1(9). This is quite useful as you can stick them in for loops and stuff. Is this still possible with VB.NET and Measuement Studio V7.1 Enterprise and if so how??

cheers
0 Kudos
Message 1 of 2
(3,274 Views)
What you're describing (control arrays) was a feature of Visual Basic, not a feature of ComponentWorks, Measurement Studio, or ActiveX controls. For more information about how this has changed between VB6 and VB.NET, see the following MSDN articles:



If you're only interested in this for looping
, you can do this by creating an array variable and populating it when the form loads:

Public Class MyForm
Inherits System.Windows.Forms.Form

Private gauges() As Gauge

Protected Overrides Sub OnLoad(ByVal e as EventArgs)
gauges = New Gauge() {Gauge1, Gauge2, ... , Gauge9}
' Now use the gauges array for looping, etc.
End Sub
End Class

- Elton
0 Kudos
Message 2 of 2
(3,274 Views)