property DragInfo.Layer as Long
Specifies the layer being dragged.

TypeDescription
Long A Long expression that specifies the index of the layer being dragged. 
By default, the Layer property indicates the layer being clicked when the drag operation begins. You can change the Layer property to perform the drag operation to any other layer. In order to do that, you need to change the layer's OnDrag property. The OnDrag property indicates the action to be performed when the user drags the layer. You can use the LayerFromPoint(-1,-1) property to get the layer from the cursor. 

The following samples show how you can rotate the layer with the index 9, by clicking anywhere on the control:

VBA (MS Access, Excell...)

' DragStart event - Occurs once the user starts dragging a layer.
Private Sub Gauge1_DragStart(ByVal DragInfo As Object,Cancel As Boolean)
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
End Sub

With Gauge1
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB6

' DragStart event - Occurs once the user starts dragging a layer.
Private Sub Gauge1_DragStart(ByVal DragInfo As EXGAUGELibCtl.IDragInfo,Cancel As Boolean)
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
End Sub

With Gauge1
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB.NET

' DragStart event - Occurs once the user starts dragging a layer.
Private Sub Exgauge1_DragStart(ByVal sender As System.Object,ByVal DragInfo As exontrol.EXGAUGELib.DragInfo,ByRef Cancel As Boolean) Handles Exgauge1.DragStart
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
End Sub

With Exgauge1
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB.NET for /COM

' DragStart event - Occurs once the user starts dragging a layer.
Private Sub AxGauge1_DragStart(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_DragStartEvent) Handles AxGauge1.DragStart
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
End Sub

With AxGauge1
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

C++

// DragStart event - Occurs once the user starts dragging a layer.
void OnDragStartGauge1(LPDISPATCH   DragInfo,BOOL FAR*   Cancel)
{
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
}

/*
	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->PutPicturesPath(L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
spGauge1->PutPicturesName(L"`Layer` + int(value  + 1) + `.png`");
spGauge1->GetLayers()->PutCount(11);

C++ Builder

// DragStart event - Occurs once the user starts dragging a layer.
void __fastcall TForm1::Gauge1DragStart(TObject *Sender,Exgaugelib_tlb::IDragInfo   *DragInfo,VARIANT_BOOL *   Cancel)
{
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
}

Gauge1->PicturesPath = L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
Gauge1->PicturesName = L"`Layer` + int(value  + 1) + `.png`";
Gauge1->Layers->Count = 11;

C#

// DragStart event - Occurs once the user starts dragging a layer.
private void exgauge1_DragStart(object sender,exontrol.EXGAUGELib.DragInfo   DragInfo,ref bool   Cancel)
{
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
}
//this.exgauge1.DragStart += new exontrol.EXGAUGELib.exg2antt.DragStartEventHandler(this.exgauge1_DragStart);

exgauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
exgauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
exgauge1.Layers.Count = 11;

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="Gauge1" EVENT="DragStart(DragInfo,Cancel)" LANGUAGE="JScript">
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
</SCRIPT>

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

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Gauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
	Gauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
	Gauge1.Layers.Count = 11;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 11
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// DragStart event - Occurs once the user starts dragging a layer.
private void axGauge1_DragStart(object sender, AxEXGAUGELib._IGaugeEvents_DragStartEvent e)
{
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
}
//this.axGauge1.DragStart += new AxEXGAUGELib._IGaugeEvents_DragStartEventHandler(this.axGauge1_DragStart);

axGauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
axGauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
axGauge1.Layers.Count = 11;

X++ (Dynamics Ax 2009)

// DragStart event - Occurs once the user starts dragging a layer.
void onEvent_DragStart(COM   _DragInfo,COMVariant /*bool*/   _Cancel)
{
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
	;
}

public void init()
{
	;

	super();

	exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
	exgauge1.PicturesName("`Layer` + int(value  + 1) + `.png`");
	exgauge1.Layers().Count(11);
}

Delphi 8 (.NET only)

// DragStart event - Occurs once the user starts dragging a layer.
procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent);
begin
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
end;

with AxGauge1 do
begin
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
end

Delphi (standard)

// DragStart event - Occurs once the user starts dragging a layer.
procedure TForm1.Gauge1DragStart(ASender: TObject; DragInfo : IDragInfo;var Cancel : WordBool);
begin
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
end;

with Gauge1 do
begin
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
end

VFP

*** DragStart event - Occurs once the user starts dragging a layer. ***
LPARAMETERS DragInfo,Cancel
	*** DragInfo.Layer = 9
	*** Layers(DragInfo.Layer).OnDrag = 2

with thisform.Gauge1
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
endwith

dBASE Plus

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Layer = 9 */
	/* Layers(DragInfo.Layer).OnDrag = 2 */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

local oGauge

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

XBasic (Alpha Five)

' Occurs once the user starts dragging a layer.
function DragStart as v (DragInfo  as  OLE::Exontrol.Gauge.1::IDragInfo,Cancel  as  L)
	' DragInfo.Layer = 9
	' Layers(DragInfo.Layer).OnDrag = 2
	oGauge = topparent:CONTROL_ACTIVEX1.activex
end function

Dim oGauge as P

oGauge = topparent:CONTROL_ACTIVEX1.activex
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

Visual Objects

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2

RETURN NIL


oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + int(value  + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 11

PowerBuilder

/*begin event DragStart(oleobject  DragInfo,boolean  Cancel) - Occurs once the user starts dragging a layer.*/
/*
	DragInfo.Layer = 9
	Layers(DragInfo.Layer).OnDrag = 2
	oGauge = ole_1.Object
*/
/*end event DragStart*/

OleObject oGauge

oGauge = ole_1.Object
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

Visual DataFlex

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Layer = 9
	// Layers(DragInfo.Layer).OnDrag = 2
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
End_Procedure

XBase++

PROCEDURE OnDragStart(oGauge,DragInfo,Cancel)
	/*DragInfo.Layer = 9*/
	/*Layers(DragInfo.Layer).OnDrag = 2*/

RETURN

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

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

	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:DragStart := {|DragInfo,Cancel| OnDragStart(oGauge,DragInfo,Cancel)} /*Occurs once the user starts dragging a layer.*/

		oGauge:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		oGauge:PicturesName := "`Layer` + int(value  + 1) + `.png`"
		oGauge:Layers():Count := 11

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