Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically set range of gauge control

Put a gauge control on form. Set range at design time (just like Measurement Studio User manual shows). Gauge.range.maximum is readonly.  Intellisense says 'set range with constructor' which I interpret to be New which is not overloaded and doesn't accept arguments.
0 Kudos
Message 1 of 3
(3,422 Views)
I looked at the designer generated code and found that the following method works:
 
Me.Gauge1.Range = New NationalInstruments.UI.Range(GaugeMin, GaugeMax)

I am concerned about creating a new range without destroying the old one. It is definitely not clear from the online help if this method will keep generating a lot of new range objects.

Comments anyone?

0 Kudos
Message 2 of 3
(3,409 Views)
The .NET Common Language Runtime automatically cleans up objects that do not have references to them, so you don't have to worry about leaking these Range objects. This feature is called garbage collection.
 
Here is a link to some detailed information on garbage collection in .NET:
0 Kudos
Message 3 of 3
(3,405 Views)