property Layer.LayerToClientX (X as Variant, Y as Variant) as Long
Converts the x-position of the layer to control's client x-position.

TypeDescription
X as Variant A Lone expression that specifies the x-position of the point within the layer
Y as Variant A Lone expression that specifies the y-position of the point within the layer
Long A Long expression that specifies the x-position of the point on the control's view that's equivalent of the point on the layer.
The LayerToClientX / LayerToClientY converts the (x,y)-point on the layer to control's view point. The LayerToClientX / LayerToClientY properties translate a point from the layer ( as it is moved or rotated ) to the control's view. For instance, you can display the current value of the control on the knob you are rotating. The RotamoveCenterX / RotamoveCenterY specifies the (x,y)-position of the layer's center, while the layer's drag operation is exDoRotamove. The OnDrag property indicates the action to be performed when the user drags the layer.

Any of the following properties can be used to display a HTML caption:

The following sample shows how you can use the LayerToClientX / LayerToClientY properties to display the layer's value on the knob:

VBA (MS Access, Excell...)

' Change event - Occurs when the layer's value is changed.
Private Sub Gauge1_Change(ByVal Layer As Long)
	With Gauge1
		.ExtraCaption("Client",0) = .FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Gauge1.Value)
		.ExtraCaption("Client",4) = .FormatABC("value - 8",Gauge1.Layers.Item(9).LayerToClientX(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
		.ExtraCaption("Client",5) = .FormatABC("value - 26",Gauge1.Layers.Item(9).LayerToClientY(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
	End With
End Sub

With Gauge1
	.BeginUpdate 
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + str(value + 1) + `.png`"
	.Layers.Count = 11
	.AllowSmoothChange = 0
	With .Layers.Item(9)
		.DefaultRotateAngle = -126
		.OnDrag = 3
		.RotateAngleToValue = "100 - (value / 360 * 100)"
		.ValueToRotateAngle = "(value)/100 * 360"
		.ValueToOffsetX = "value"
		.OffsetToValue = "value"
		.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
	End With
	With .Layers.Item(7)
		.OnDrag = 2
		.RotateType = 2
	End With
	.Value = 25
	.EndUpdate 
End With

VB6

' Change event - Occurs when the layer's value is changed.
Private Sub Gauge1_Change(ByVal Layer As Long)
	With Gauge1
		.ExtraCaption("Client",exLayerCaption) = .FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Gauge1.Value)
		.ExtraCaption("Client",exLayerCaptionLeft) = .FormatABC("value - 8",Gauge1.Layers.Item(9).LayerToClientX(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
		.ExtraCaption("Client",exLayerCaptionTop) = .FormatABC("value - 26",Gauge1.Layers.Item(9).LayerToClientY(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
	End With
End Sub

With Gauge1
	.BeginUpdate 
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + str(value + 1) + `.png`"
	.Layers.Count = 11
	.AllowSmoothChange = exSmoothChangeless
	With .Layers.Item(9)
		.DefaultRotateAngle = -126
		.OnDrag = exDoRotamove
		.RotateAngleToValue = "100 - (value / 360 * 100)"
		.ValueToRotateAngle = "(value)/100 * 360"
		.ValueToOffsetX = "value"
		.OffsetToValue = "value"
		.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
	End With
	With .Layers.Item(7)
		.OnDrag = exDoRotate
		.RotateType = exRotateBilinearInterpolation
	End With
	.Value = 25
	.EndUpdate 
End With

VB.NET

' Change event - Occurs when the layer's value is changed.
Private Sub Exgauge1_Change(ByVal sender As System.Object,ByVal Layer As Integer) Handles Exgauge1.Change
	With Exgauge1
		.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Exgauge1.Value))
		.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,.FormatABC("value - 8",Exgauge1.Layers.Item(9).get_LayerToClientX(Exgauge1.Layers.Item(9).RotamoveCenterX,Exgauge1.Layers.Item(9).RotamoveCenterY)))
		.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,.FormatABC("value - 26",Exgauge1.Layers.Item(9).get_LayerToClientY(Exgauge1.Layers.Item(9).RotamoveCenterX,Exgauge1.Layers.Item(9).RotamoveCenterY)))
	End With
End Sub

With Exgauge1
	.BeginUpdate()
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + str(value + 1) + `.png`"
	.Layers.Count = 11
	.AllowSmoothChange = exontrol.EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless
	With .Layers.Item(9)
		.DefaultRotateAngle = -126
		.OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotamove
		.RotateAngleToValue = "100 - (value / 360 * 100)"
		.ValueToRotateAngle = "(value)/100 * 360"
		.ValueToOffsetX = "value"
		.OffsetToValue = "value"
		.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
	End With
	With .Layers.Item(7)
		.OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotate
		.RotateType = exontrol.EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation
	End With
	.Value = 25
	.EndUpdate()
End With

VB.NET for /COM

' Change event - Occurs when the layer's value is changed.
Private Sub AxGauge1_Change(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_ChangeEvent) Handles AxGauge1.Change
	With AxGauge1
		.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",AxGauge1.Value))
		.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,.FormatABC("value - 8",AxGauge1.Layers.Item(9).LayerToClientX(AxGauge1.Layers.Item(9).RotamoveCenterX,AxGauge1.Layers.Item(9).RotamoveCenterY)))
		.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,.FormatABC("value - 26",AxGauge1.Layers.Item(9).LayerToClientY(AxGauge1.Layers.Item(9).RotamoveCenterX,AxGauge1.Layers.Item(9).RotamoveCenterY)))
	End With
End Sub

With AxGauge1
	.BeginUpdate()
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + str(value + 1) + `.png`"
	.Layers.Count = 11
	.AllowSmoothChange = EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless
	With .Layers.Item(9)
		.DefaultRotateAngle = -126
		.OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotamove
		.RotateAngleToValue = "100 - (value / 360 * 100)"
		.ValueToRotateAngle = "(value)/100 * 360"
		.ValueToOffsetX = "value"
		.OffsetToValue = "value"
		.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
	End With
	With .Layers.Item(7)
		.OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotate
		.RotateType = EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation
	End With
	.Value = 25
	.EndUpdate()
End With

C++

// Change event - Occurs when the layer's value is changed.
void OnChangeGauge1(long   Layer)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGAUGELib' for the library: 'ExGauge 1.0 Control Library'
		#import <ExGauge.dll>
		using namespace EXGAUGELib;
	*/
	EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown();
	spGauge1->PutExtraCaption("Client",EXGAUGELib::exLayerCaption,spGauge1->FormatABC(L"`<sha ;;0><font ;12><b>` + (100 - value format `0`)",spGauge1->GetValue(),vtMissing,vtMissing));
	spGauge1->PutExtraCaption("Client",EXGAUGELib::exLayerCaptionLeft,spGauge1->FormatABC(L"value - 8",spGauge1->GetLayers()->GetItem(long(9))->GetLayerToClientX(spGauge1->GetLayers()->GetItem(long(9))->GetRotamoveCenterX(),spGauge1->GetLayers()->GetItem(long(9))->GetRotamoveCenterY()),vtMissing,vtMissing));
	spGauge1->PutExtraCaption("Client",EXGAUGELib::exLayerCaptionTop,spGauge1->FormatABC(L"value - 26",spGauge1->GetLayers()->GetItem(long(9))->GetLayerToClientY(spGauge1->GetLayers()->GetItem(long(9))->GetRotamoveCenterX(),spGauge1->GetLayers()->GetItem(long(9))->GetRotamoveCenterY()),vtMissing,vtMissing));
}

EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown();
spGauge1->BeginUpdate();
spGauge1->PutPicturesPath(L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
spGauge1->PutPicturesName(L"`Layer` + str(value + 1) + `.png`");
spGauge1->GetLayers()->PutCount(11);
spGauge1->PutAllowSmoothChange(EXGAUGELib::exSmoothChangeless);
EXGAUGELib::ILayerPtr var_Layer = spGauge1->GetLayers()->GetItem(long(9));
	var_Layer->PutDefaultRotateAngle(-126);
	var_Layer->PutOnDrag(EXGAUGELib::exDoRotamove);
	var_Layer->PutRotateAngleToValue(L"100 - (value / 360 * 100)");
	var_Layer->PutValueToRotateAngle(L"(value)/100 * 360");
	var_Layer->PutValueToOffsetX(L"value");
	var_Layer->PutOffsetToValue(L"value");
	var_Layer->PutRotateAngleValid(L"int(value / 360 * 100)/100 * 360");
EXGAUGELib::ILayerPtr var_Layer1 = spGauge1->GetLayers()->GetItem(long(7));
	var_Layer1->PutOnDrag(EXGAUGELib::exDoRotate);
	var_Layer1->PutRotateType(EXGAUGELib::exRotateBilinearInterpolation);
spGauge1->PutValue(long(25));
spGauge1->EndUpdate();

C++ Builder

// Change event - Occurs when the layer's value is changed.
void __fastcall TForm1::Gauge1Change(TObject *Sender,long   Layer)
{
	Gauge1->ExtraCaption[TVariant("Client"),Exgaugelib_tlb::PropertyLayerCaptionEnum::exLayerCaption] = TVariant(Gauge1->FormatABC(L"`<sha ;;0><font ;12><b>` + (100 - value format `0`)",TVariant(Gauge1->get_Value()),TNoParam(),TNoParam()));
	Gauge1->ExtraCaption[TVariant("Client"),Exgaugelib_tlb::PropertyLayerCaptionEnum::exLayerCaptionLeft] = TVariant(Gauge1->FormatABC(L"value - 8",TVariant(Gauge1->Layers->get_Item(TVariant(9))->get_LayerToClientX(TVariant(Gauge1->Layers->get_Item(TVariant(9))->RotamoveCenterX),TVariant(Gauge1->Layers->get_Item(TVariant(9))->RotamoveCenterY))),TNoParam(),TNoParam()));
	Gauge1->ExtraCaption[TVariant("Client"),Exgaugelib_tlb::PropertyLayerCaptionEnum::exLayerCaptionTop] = TVariant(Gauge1->FormatABC(L"value - 26",TVariant(Gauge1->Layers->get_Item(TVariant(9))->get_LayerToClientY(TVariant(Gauge1->Layers->get_Item(TVariant(9))->RotamoveCenterX),TVariant(Gauge1->Layers->get_Item(TVariant(9))->RotamoveCenterY))),TNoParam(),TNoParam()));
}

Gauge1->BeginUpdate();
Gauge1->PicturesPath = L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
Gauge1->PicturesName = L"`Layer` + str(value + 1) + `.png`";
Gauge1->Layers->Count = 11;
Gauge1->AllowSmoothChange = Exgaugelib_tlb::SmoothPropertyEnum::exSmoothChangeless;
Exgaugelib_tlb::ILayerPtr var_Layer = Gauge1->Layers->get_Item(TVariant(9));
	var_Layer->DefaultRotateAngle = -126;
	var_Layer->OnDrag = Exgaugelib_tlb::OnDragLayerEnum::exDoRotamove;
	var_Layer->RotateAngleToValue = L"100 - (value / 360 * 100)";
	var_Layer->ValueToRotateAngle = L"(value)/100 * 360";
	var_Layer->ValueToOffsetX = L"value";
	var_Layer->OffsetToValue = L"value";
	var_Layer->RotateAngleValid = L"int(value / 360 * 100)/100 * 360";
Exgaugelib_tlb::ILayerPtr var_Layer1 = Gauge1->Layers->get_Item(TVariant(7));
	var_Layer1->OnDrag = Exgaugelib_tlb::OnDragLayerEnum::exDoRotate;
	var_Layer1->RotateType = Exgaugelib_tlb::RotateTypeEnum::exRotateBilinearInterpolation;
Gauge1->set_Value(TVariant(25));
Gauge1->EndUpdate();

C#

// Change event - Occurs when the layer's value is changed.
private void exgauge1_Change(object sender,int   Layer)
{
	exgauge1.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,exgauge1.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",exgauge1.Value,null,null));
	exgauge1.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,exgauge1.FormatABC("value - 8",exgauge1.Layers[9].get_LayerToClientX(exgauge1.Layers[9].RotamoveCenterX,exgauge1.Layers[9].RotamoveCenterY),null,null));
	exgauge1.set_ExtraCaption("Client",exontrol.EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,exgauge1.FormatABC("value - 26",exgauge1.Layers[9].get_LayerToClientY(exgauge1.Layers[9].RotamoveCenterX,exgauge1.Layers[9].RotamoveCenterY),null,null));
}
//this.exgauge1.Change += new exontrol.EXGAUGELib.exg2antt.ChangeEventHandler(this.exgauge1_Change);

exgauge1.BeginUpdate();
exgauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
exgauge1.PicturesName = "`Layer` + str(value + 1) + `.png`";
exgauge1.Layers.Count = 11;
exgauge1.AllowSmoothChange = exontrol.EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
exontrol.EXGAUGELib.Layer var_Layer = exgauge1.Layers[9];
	var_Layer.DefaultRotateAngle = -126;
	var_Layer.OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotamove;
	var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)";
	var_Layer.ValueToRotateAngle = "(value)/100 * 360";
	var_Layer.ValueToOffsetX = "value";
	var_Layer.OffsetToValue = "value";
	var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360";
exontrol.EXGAUGELib.Layer var_Layer1 = exgauge1.Layers[7];
	var_Layer1.OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotate;
	var_Layer1.RotateType = exontrol.EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation;
exgauge1.Value = 25;
exgauge1.EndUpdate();

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="Gauge1" EVENT="Change(Layer)" LANGUAGE="JScript">
	Gauge1.ExtraCaption("Client",0) = Gauge1.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Gauge1.Value,null,null);
	Gauge1.ExtraCaption("Client",4) = Gauge1.FormatABC("value - 8",Gauge1.Layers.Item(9).LayerToClientX(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY),null,null);
	Gauge1.ExtraCaption("Client",5) = Gauge1.FormatABC("value - 26",Gauge1.Layers.Item(9).LayerToClientY(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY),null,null);
</SCRIPT>

<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Gauge1.BeginUpdate();
	Gauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
	Gauge1.PicturesName = "`Layer` + str(value + 1) + `.png`";
	Gauge1.Layers.Count = 11;
	Gauge1.AllowSmoothChange = 0;
	var var_Layer = Gauge1.Layers.Item(9);
		var_Layer.DefaultRotateAngle = -126;
		var_Layer.OnDrag = 3;
		var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)";
		var_Layer.ValueToRotateAngle = "(value)/100 * 360";
		var_Layer.ValueToOffsetX = "value";
		var_Layer.OffsetToValue = "value";
		var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360";
	var var_Layer1 = Gauge1.Layers.Item(7);
		var_Layer1.OnDrag = 2;
		var_Layer1.RotateType = 2;
	Gauge1.Value = 25;
	Gauge1.EndUpdate();
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.ExtraCaption("Client",0) = .FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Gauge1.Value)
		.ExtraCaption("Client",4) = .FormatABC("value - 8",Gauge1.Layers.Item(9).LayerToClientX(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
		.ExtraCaption("Client",5) = .FormatABC("value - 26",Gauge1.Layers.Item(9).LayerToClientY(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 11
		.AllowSmoothChange = 0
		With .Layers.Item(9)
			.DefaultRotateAngle = -126
			.OnDrag = 3
			.RotateAngleToValue = "100 - (value / 360 * 100)"
			.ValueToRotateAngle = "(value)/100 * 360"
			.ValueToOffsetX = "value"
			.OffsetToValue = "value"
			.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
		End With
		With .Layers.Item(7)
			.OnDrag = 2
			.RotateType = 2
		End With
		.Value = 25
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// Change event - Occurs when the layer's value is changed.
private void axGauge1_Change(object sender, AxEXGAUGELib._IGaugeEvents_ChangeEvent e)
{
	axGauge1.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,axGauge1.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",axGauge1.Value,null,null));
	axGauge1.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,axGauge1.FormatABC("value - 8",axGauge1.Layers[9].get_LayerToClientX(axGauge1.Layers[9].RotamoveCenterX,axGauge1.Layers[9].RotamoveCenterY),null,null));
	axGauge1.set_ExtraCaption("Client",EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,axGauge1.FormatABC("value - 26",axGauge1.Layers[9].get_LayerToClientY(axGauge1.Layers[9].RotamoveCenterX,axGauge1.Layers[9].RotamoveCenterY),null,null));
}
//this.axGauge1.Change += new AxEXGAUGELib._IGaugeEvents_ChangeEventHandler(this.axGauge1_Change);

axGauge1.BeginUpdate();
axGauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
axGauge1.PicturesName = "`Layer` + str(value + 1) + `.png`";
axGauge1.Layers.Count = 11;
axGauge1.AllowSmoothChange = EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
EXGAUGELib.Layer var_Layer = axGauge1.Layers[9];
	var_Layer.DefaultRotateAngle = -126;
	var_Layer.OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotamove;
	var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)";
	var_Layer.ValueToRotateAngle = "(value)/100 * 360";
	var_Layer.ValueToOffsetX = "value";
	var_Layer.OffsetToValue = "value";
	var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360";
EXGAUGELib.Layer var_Layer1 = axGauge1.Layers[7];
	var_Layer1.OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotate;
	var_Layer1.RotateType = EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation;
axGauge1.Value = 25;
axGauge1.EndUpdate();

X++ (Dynamics Ax 2009)

// Change event - Occurs when the layer's value is changed.
void onEvent_Change(int   _Layer)
{
	;
	exgauge1.ExtraCaption("Client",0/*exLayerCaption*/,exgauge1.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",exgauge1.Value()));
	exgauge1.ExtraCaption("Client",4/*exLayerCaptionLeft*/,exgauge1.FormatABC("value - 8",exgauge1.Layers().Item(COMVariant::createFromInt(9)).LayerToClientX(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY())));
	exgauge1.ExtraCaption("Client",5/*exLayerCaptionTop*/,exgauge1.FormatABC("value - 26",exgauge1.Layers().Item(COMVariant::createFromInt(9)).LayerToClientY(exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterX(),exgauge1.Layers().Item(COMVariant::createFromInt(9)).RotamoveCenterY())));
}

public void init()
{
	COM com_Layer,com_Layer1;
	anytype var_Layer,var_Layer1;
	;

	super();

	exgauge1.BeginUpdate();
	exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
	exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`");
	exgauge1.Layers().Count(11);
	exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
	var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer;
		com_Layer.DefaultRotateAngle(-126);
		com_Layer.OnDrag(3/*exDoRotamove*/);
		com_Layer.RotateAngleToValue("100 - (value / 360 * 100)");
		com_Layer.ValueToRotateAngle("(value)/100 * 360");
		com_Layer.ValueToOffsetX("value");
		com_Layer.OffsetToValue("value");
		com_Layer.RotateAngleValid("int(value / 360 * 100)/100 * 360");
	var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(7)); com_Layer1 = var_Layer1;
		com_Layer1.OnDrag(2/*exDoRotate*/);
		com_Layer1.RotateType(2/*exRotateBilinearInterpolation*/);
	exgauge1.Value(COMVariant::createFromInt(25));
	exgauge1.EndUpdate();
}

Delphi 8 (.NET only)

// Change event - Occurs when the layer's value is changed.
procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent);
begin
	with AxGauge1 do
	begin
		set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`<sha ;;0><font ;12><b>` + (100 - value format `0`)',AxGauge1.Value,Nil,Nil));
		set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,FormatABC('value - 8',TObject(AxGauge1.Layers.Item[TObject(9)].LayerToClientX[TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterX),TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterY)]),Nil,Nil));
		set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,FormatABC('value - 26',TObject(AxGauge1.Layers.Item[TObject(9)].LayerToClientY[TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterX),TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterY)]),Nil,Nil));
	end
end;

with AxGauge1 do
begin
	BeginUpdate();
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + str(value + 1) + `.png`';
	Layers.Count := 11;
	AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
	with Layers.Item[TObject(9)] do
	begin
		DefaultRotateAngle := -126;
		OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove;
		RotateAngleToValue := '100 - (value / 360 * 100)';
		ValueToRotateAngle := '(value)/100 * 360';
		ValueToOffsetX := 'value';
		OffsetToValue := 'value';
		RotateAngleValid := 'int(value / 360 * 100)/100 * 360';
	end;
	with Layers.Item[TObject(7)] do
	begin
		OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate;
		RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation;
	end;
	Value := TObject(25);
	EndUpdate();
end

Delphi (standard)

// Change event - Occurs when the layer's value is changed.
procedure TForm1.Gauge1Change(ASender: TObject; Layer : Integer);
begin
	with Gauge1 do
	begin
		ExtraCaption['Client',EXGAUGELib_TLB.exLayerCaption] := FormatABC('`<sha ;;0><font ;12><b>` + (100 - value format `0`)',Gauge1.Value,Null,Null);
		ExtraCaption['Client',EXGAUGELib_TLB.exLayerCaptionLeft] := FormatABC('value - 8',OleVariant(Gauge1.Layers.Item[OleVariant(9)].LayerToClientX[OleVariant(Gauge1.Layers.Item[OleVariant(9)].RotamoveCenterX),OleVariant(Gauge1.Layers.Item[OleVariant(9)].RotamoveCenterY)]),Null,Null);
		ExtraCaption['Client',EXGAUGELib_TLB.exLayerCaptionTop] := FormatABC('value - 26',OleVariant(Gauge1.Layers.Item[OleVariant(9)].LayerToClientY[OleVariant(Gauge1.Layers.Item[OleVariant(9)].RotamoveCenterX),OleVariant(Gauge1.Layers.Item[OleVariant(9)].RotamoveCenterY)]),Null,Null);
	end
end;

with Gauge1 do
begin
	BeginUpdate();
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + str(value + 1) + `.png`';
	Layers.Count := 11;
	AllowSmoothChange := EXGAUGELib_TLB.exSmoothChangeless;
	with Layers.Item[OleVariant(9)] do
	begin
		DefaultRotateAngle := -126;
		OnDrag := EXGAUGELib_TLB.exDoRotamove;
		RotateAngleToValue := '100 - (value / 360 * 100)';
		ValueToRotateAngle := '(value)/100 * 360';
		ValueToOffsetX := 'value';
		OffsetToValue := 'value';
		RotateAngleValid := 'int(value / 360 * 100)/100 * 360';
	end;
	with Layers.Item[OleVariant(7)] do
	begin
		OnDrag := EXGAUGELib_TLB.exDoRotate;
		RotateType := EXGAUGELib_TLB.exRotateBilinearInterpolation;
	end;
	Value := OleVariant(25);
	EndUpdate();
end

VFP

*** Change event - Occurs when the layer's value is changed. ***
LPARAMETERS Layer
	with thisform.Gauge1
		.Object.ExtraCaption("Client",0) = .FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",thisform.Gauge1.Value)
		.Object.ExtraCaption("Client",4) = .FormatABC("value - 8",thisform.Gauge1.Layers.Item(9).LayerToClientX(thisform.Gauge1.Layers.Item(9).RotamoveCenterX,thisform.Gauge1.Layers.Item(9).RotamoveCenterY))
		.Object.ExtraCaption("Client",5) = .FormatABC("value - 26",thisform.Gauge1.Layers.Item(9).LayerToClientY(thisform.Gauge1.Layers.Item(9).RotamoveCenterX,thisform.Gauge1.Layers.Item(9).RotamoveCenterY))
	endwith

with thisform.Gauge1
	.BeginUpdate
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + str(value + 1) + `.png`"
	.Layers.Count = 11
	.AllowSmoothChange = 0
	with .Layers.Item(9)
		.DefaultRotateAngle = -126
		.OnDrag = 3
		.RotateAngleToValue = "100 - (value / 360 * 100)"
		.ValueToRotateAngle = "(value)/100 * 360"
		.ValueToOffsetX = "value"
		.OffsetToValue = "value"
		.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
	endwith
	with .Layers.Item(7)
		.OnDrag = 2
		.RotateType = 2
	endwith
	.Value = 25
	.EndUpdate
endwith

dBASE Plus

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Template = [ExtraCaption("Client",0) = FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Me.Value)] // oGauge.ExtraCaption("Client",0) = oGauge.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oGauge.Value)
	oGauge.Template = [ExtraCaption("Client",4) = FormatABC("value - 8",Me.Layers.Item(9).LayerToClientX(Me.Layers.Item(9).RotamoveCenterX,Me.Layers.Item(9).RotamoveCenterY))] // oGauge.ExtraCaption("Client",4) = oGauge.FormatABC("value - 8",oGauge.Layers.Item(9).LayerToClientX(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY))
	oGauge.Template = [ExtraCaption("Client",5) = FormatABC("value - 26",Me.Layers.Item(9).LayerToClientY(Me.Layers.Item(9).RotamoveCenterX,Me.Layers.Item(9).RotamoveCenterY))] // oGauge.ExtraCaption("Client",5) = oGauge.FormatABC("value - 26",oGauge.Layers.Item(9).LayerToClientY(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY))
return

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 11
oGauge.AllowSmoothChange = 0
var_Layer = oGauge.Layers.Item(9)
	var_Layer.DefaultRotateAngle = -126
	var_Layer.OnDrag = 3
	var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)"
	var_Layer.ValueToRotateAngle = "(value)/100 * 360"
	var_Layer.ValueToOffsetX = "value"
	var_Layer.OffsetToValue = "value"
	var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
var_Layer1 = oGauge.Layers.Item(7)
	var_Layer1.OnDrag = 2
	var_Layer1.RotateType = 2
oGauge.Value = 25
oGauge.EndUpdate()

XBasic (Alpha Five)

' Occurs when the layer's value is changed.
function Change as v (Layer  as  N)
	oGauge = topparent:CONTROL_ACTIVEX1.activex
	oGauge.Template = "ExtraCaption(`Client`,0) = FormatABC(```<sha ;;0><font ;12><b>`` + (100 - value format ``0``)`,Me.Value)" // oGauge.ExtraCaption("Client",0) = oGauge.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oGauge.Value)
	oGauge.Template = "ExtraCaption(`Client`,4) = FormatABC(`value - 8`,Me.Layers.Item(9).LayerToClientX(Me.Layers.Item(9).RotamoveCenterX,Me.Layers.Item(9).RotamoveCenterY))" // oGauge.ExtraCaption("Client",4) = oGauge.FormatABC("value - 8",oGauge.Layers.Item(9).LayerToClientX(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY))
	oGauge.Template = "ExtraCaption(`Client`,5) = FormatABC(`value - 26`,Me.Layers.Item(9).LayerToClientY(Me.Layers.Item(9).RotamoveCenterX,Me.Layers.Item(9).RotamoveCenterY))" // oGauge.ExtraCaption("Client",5) = oGauge.FormatABC("value - 26",oGauge.Layers.Item(9).LayerToClientY(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY))
end function

Dim oGauge as P
Dim var_Layer as P
Dim var_Layer1 as P

oGauge = topparent:CONTROL_ACTIVEX1.activex
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 11
oGauge.AllowSmoothChange = 0
var_Layer = oGauge.Layers.Item(9)
	var_Layer.DefaultRotateAngle = -126
	var_Layer.OnDrag = 3
	var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)"
	var_Layer.ValueToRotateAngle = "(value)/100 * 360"
	var_Layer.ValueToOffsetX = "value"
	var_Layer.OffsetToValue = "value"
	var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
var_Layer1 = oGauge.Layers.Item(7)
	var_Layer1.OnDrag = 2
	var_Layer1.RotateType = 2
oGauge.Value = 25
oGauge.EndUpdate()

Visual Objects

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionLeft] := oDCOCX_Exontrol1:FormatABC("value - 8",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY],nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionTop] := oDCOCX_Exontrol1:FormatABC("value - 26",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientY,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY],nil,nil)
RETURN NIL

local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:DefaultRotateAngle := -126
	var_Layer:OnDrag := exDoRotamove
	var_Layer:RotateAngleToValue := "100 - (value / 360 * 100)"
	var_Layer:ValueToRotateAngle := "(value)/100 * 360"
	var_Layer:ValueToOffsetX := "value"
	var_Layer:OffsetToValue := "value"
	var_Layer:RotateAngleValid := "int(value / 360 * 100)/100 * 360"
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,7]
	var_Layer1:OnDrag := exDoRotate
	var_Layer1:RotateType := exRotateBilinearInterpolation
oDCOCX_Exontrol1:Value := 25
oDCOCX_Exontrol1:EndUpdate()

PowerBuilder

/*begin event Change(long  Layer) - Occurs when the layer's value is changed.*/
/*
	oGauge = ole_1.Object
	oGauge.ExtraCaption("Client",0,oGauge.FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oGauge.Value))
	oGauge.ExtraCaption("Client",4,oGauge.FormatABC("value - 8",oGauge.Layers.Item(9).LayerToClientX(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)))
	oGauge.ExtraCaption("Client",5,oGauge.FormatABC("value - 26",oGauge.Layers.Item(9).LayerToClientY(oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)))
*/
/*end event Change*/

OleObject oGauge,var_Layer,var_Layer1

oGauge = ole_1.Object
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 11
oGauge.AllowSmoothChange = 0
var_Layer = oGauge.Layers.Item(9)
	var_Layer.DefaultRotateAngle = -126
	var_Layer.OnDrag = 3
	var_Layer.RotateAngleToValue = "100 - (value / 360 * 100)"
	var_Layer.ValueToRotateAngle = "(value)/100 * 360"
	var_Layer.ValueToOffsetX = "value"
	var_Layer.OffsetToValue = "value"
	var_Layer.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
var_Layer1 = oGauge.Layers.Item(7)
	var_Layer1.OnDrag = 2
	var_Layer1.RotateType = 2
oGauge.Value = 25
oGauge.EndUpdate()

Visual DataFlex

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
		Get ComValue to vA
	Set ComExtraCaption "Client" OLEexLayerCaption to (ComFormatABC(Self,"`<sha ;;0><font ;12><b>` + (100 - value format `0`)",vA,Nothing,Nothing))
	Variant vA1
		Variant voLayers
		Get ComLayers to voLayers
		Handle hoLayers
		Get Create (RefClass(cComLayers)) to hoLayers
		Set pvComObject of hoLayers to voLayers
			Variant voLayer
			Get ComItem of hoLayers 9 to voLayer
			Handle hoLayer
			Get Create (RefClass(cComLayer)) to hoLayer
			Set pvComObject of hoLayer to voLayer
				Variant voLayer1
				Get ComItem of hoLayer 9 to voLayer1
				Handle hoLayer1
				Get Create (RefClass(cComLayer)) to hoLayer1
				Set pvComObject of hoLayer1 to voLayer1
					Variant vX
						Variant voLayers1
						Get ComLayers to voLayers1
						Handle hoLayers1
						Get Create (RefClass(cComLayers)) to hoLayers1
						Set pvComObject of hoLayers1 to voLayers1
							Variant voLayer2
							Get ComItem of hoLayers1 9 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 9 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Get ComRotamoveCenterX of hoLayer3 to vX
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers1
	Variant vY
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer4
							Get ComItem of hoLayers2 9 to voLayer4
							Handle hoLayer4
							Get Create (RefClass(cComLayer)) to hoLayer4
							Set pvComObject of hoLayer4 to voLayer4
								Variant voLayer5
								Get ComItem of hoLayer4 9 to voLayer5
								Handle hoLayer5
								Get Create (RefClass(cComLayer)) to hoLayer5
								Set pvComObject of hoLayer5 to voLayer5
									Get ComRotamoveCenterY of hoLayer5 to vY
								Send Destroy to hoLayer5
							Send Destroy to hoLayer4
						Send Destroy to hoLayers2
					Get ComLayerToClientX of hoLayer1 vX vY to vA1
				Send Destroy to hoLayer1
			Send Destroy to hoLayer
		Send Destroy to hoLayers
	Set ComExtraCaption "Client" OLEexLayerCaptionLeft to (ComFormatABC(Self,"value - 8",vA1,Nothing,Nothing))
	Variant vA2
		Variant voLayers3
		Get ComLayers to voLayers3
		Handle hoLayers3
		Get Create (RefClass(cComLayers)) to hoLayers3
		Set pvComObject of hoLayers3 to voLayers3
			Variant voLayer6
			Get ComItem of hoLayers3 9 to voLayer6
			Handle hoLayer6
			Get Create (RefClass(cComLayer)) to hoLayer6
			Set pvComObject of hoLayer6 to voLayer6
				Variant voLayer7
				Get ComItem of hoLayer6 9 to voLayer7
				Handle hoLayer7
				Get Create (RefClass(cComLayer)) to hoLayer7
				Set pvComObject of hoLayer7 to voLayer7
					Variant vX1
						Variant voLayers4
						Get ComLayers to voLayers4
						Handle hoLayers4
						Get Create (RefClass(cComLayers)) to hoLayers4
						Set pvComObject of hoLayers4 to voLayers4
							Variant voLayer8
							Get ComItem of hoLayers4 9 to voLayer8
							Handle hoLayer8
							Get Create (RefClass(cComLayer)) to hoLayer8
							Set pvComObject of hoLayer8 to voLayer8
								Variant voLayer9
								Get ComItem of hoLayer8 9 to voLayer9
								Handle hoLayer9
								Get Create (RefClass(cComLayer)) to hoLayer9
								Set pvComObject of hoLayer9 to voLayer9
									Get ComRotamoveCenterX of hoLayer9 to vX1
								Send Destroy to hoLayer9
							Send Destroy to hoLayer8
						Send Destroy to hoLayers4
	Variant vY1
						Variant voLayers5
						Get ComLayers to voLayers5
						Handle hoLayers5
						Get Create (RefClass(cComLayers)) to hoLayers5
						Set pvComObject of hoLayers5 to voLayers5
							Variant voLayer10
							Get ComItem of hoLayers5 9 to voLayer10
							Handle hoLayer10
							Get Create (RefClass(cComLayer)) to hoLayer10
							Set pvComObject of hoLayer10 to voLayer10
								Variant voLayer11
								Get ComItem of hoLayer10 9 to voLayer11
								Handle hoLayer11
								Get Create (RefClass(cComLayer)) to hoLayer11
								Set pvComObject of hoLayer11 to voLayer11
									Get ComRotamoveCenterY of hoLayer11 to vY1
								Send Destroy to hoLayer11
							Send Destroy to hoLayer10
						Send Destroy to hoLayers5
					Get ComLayerToClientY of hoLayer7 vX1 vY1 to vA2
				Send Destroy to hoLayer7
			Send Destroy to hoLayer6
		Send Destroy to hoLayers3
	Set ComExtraCaption "Client" OLEexLayerCaptionTop to (ComFormatABC(Self,"value - 26",vA2,Nothing,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Set ComCount of hoLayers6 to 11
	Send Destroy to hoLayers6
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer12
		Get ComItem of hoLayers7 9 to voLayer12
		Handle hoLayer12
		Get Create (RefClass(cComLayer)) to hoLayer12
		Set pvComObject of hoLayer12 to voLayer12
			Set ComDefaultRotateAngle of hoLayer12 to -126
			Set ComOnDrag of hoLayer12 to OLEexDoRotamove
			Set ComRotateAngleToValue of hoLayer12 to "100 - (value / 360 * 100)"
			Set ComValueToRotateAngle of hoLayer12 to "(value)/100 * 360"
			Set ComValueToOffsetX of hoLayer12 to "value"
			Set ComOffsetToValue of hoLayer12 to "value"
			Set ComRotateAngleValid of hoLayer12 to "int(value / 360 * 100)/100 * 360"
		Send Destroy to hoLayer12
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer13
		Get ComItem of hoLayers8 7 to voLayer13
		Handle hoLayer13
		Get Create (RefClass(cComLayer)) to hoLayer13
		Set pvComObject of hoLayer13 to voLayer13
			Set ComOnDrag of hoLayer13 to OLEexDoRotate
			Set ComRotateType of hoLayer13 to OLEexRotateBilinearInterpolation
		Send Destroy to hoLayer13
	Send Destroy to hoLayers8
	Set ComValue to 25
	Send ComEndUpdate
End_Procedure

XBase++

PROCEDURE OnChange(oGauge,Layer)
	oGauge:SetProperty("ExtraCaption","Client",0/*exLayerCaption*/,oGauge:FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oGauge:Value()))
	oGauge:SetProperty("ExtraCaption","Client",4/*exLayerCaptionLeft*/,oGauge:FormatABC("value - 8",oGauge:Layers:Item(9):LayerToClientX(oGauge:Layers:Item(9):RotamoveCenterX(),oGauge:Layers:Item(9):RotamoveCenterY())))
	oGauge:SetProperty("ExtraCaption","Client",5/*exLayerCaptionTop*/,oGauge:FormatABC("value - 26",oGauge:Layers:Item(9):LayerToClientY(oGauge:Layers:Item(9):RotamoveCenterX(),oGauge:Layers:Item(9):RotamoveCenterY())))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oGauge
	LOCAL oLayer,oLayer1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oGauge := XbpActiveXControl():new( oForm:drawingArea )
	oGauge:CLSID  := "Exontrol.Gauge.1" /*{91628F12-393C-44EF-A558-83ED1790AAD3}*/
	oGauge:create(,, {10,60},{610,370} )

		oGauge:Change := {|Layer| OnChange(oGauge,Layer)} /*Occurs when the layer's value is changed.*/

		oGauge:BeginUpdate()
		oGauge:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		oGauge:PicturesName := "`Layer` + str(value + 1) + `.png`"
		oGauge:Layers():Count := 11
		oGauge:AllowSmoothChange := 0/*exSmoothChangeless*/
		oLayer := oGauge:Layers:Item(9)
			oLayer:DefaultRotateAngle := -126
			oLayer:OnDrag := 3/*exDoRotamove*/
			oLayer:RotateAngleToValue := "100 - (value / 360 * 100)"
			oLayer:ValueToRotateAngle := "(value)/100 * 360"
			oLayer:ValueToOffsetX := "value"
			oLayer:OffsetToValue := "value"
			oLayer:RotateAngleValid := "int(value / 360 * 100)/100 * 360"
		oLayer1 := oGauge:Layers:Item(7)
			oLayer1:OnDrag := 2/*exDoRotate*/
			oLayer1:RotateType := 2/*exRotateBilinearInterpolation*/
		oGauge:Value := 25
		oGauge:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN