Pointer(指针)
仪表的Pointer(指针)的类型为GaugePointer,获取指针的参考代码为:
Dim
gg
As
WinForm.Gauges = e.Form.Controls("Guages1")
Dim
rg
As
RadialGauge = gg.RadialGauge
Dim
pt
As
GaugePointer = rg.Pointer
pt.Value = 20
我们在文档中依然用Pointer表示指针。
Pointer的主要属性有:
如果Gauges控件只有一个仪表,可以改写为:
Dim
g
As
WinForm.Gauges = e.Form.Controls("Guages1")
g.Value = 30
也可以一行搞定:
e.Form.Controls("Guages1").Value
= 30
如果有多个仪表,则需要明确仪表:
Dim
g
As
WinForm.Gauges = e.Form.Controls("Guages1")
g.Gauges(0).Pointer.Value =
30
g.Gauges(0).Value = 30
'和上一行等效
绝大多数时候,一个Gauges只会有一个Gause,所以通常直接这样就行了:
e.Form.Controls("Guages1").Value =
30