event MouseWheel (Delta as Long)
Occurs when the mouse wheel moves while the control has focus

TypeDescription
Delta as Long A long expression that specifies the direction and the quantity that the mouse wheel has been rolled. For instance, 1 indicates that the user rolls the mouse wheel up, -1 indicates that the user rolls the mouse wheel down. Any other value may indicate that the mouse wheel has been rolled quicker.
The MouseWheel occurs when the mouse wheel is rolled. You can use the MouseWheel event to perform different actions on any layer when the user rolls the mouse wheel. For instance, you can update the layer's value when the user rolls the muse wheel. You can use the LayerFromPoint(-1,-1) property to get the layer from the cursor. The FormatABC method formats the A,B,C values based on the giving expression and returns the result.

You can use any of the following properties to update the layer:

 The Change event occurs when the layer's value is changed.

Syntax for MouseWheel event, /NET version, on:

private void MouseWheel(object sender,int   Delta)
{
}

Private Sub MouseWheel(ByVal sender As System.Object,ByVal Delta As Integer) Handles MouseWheel
End Sub

Syntax for MouseWheel event, /COM version, on:

private void MouseWheel(object sender, AxEXGAUGELib._IGaugeEvents_MouseWheelEvent e)
{
}

void OnMouseWheel(long   Delta)
{
}

void __fastcall MouseWheel(TObject *Sender,long   Delta)
{
}

procedure MouseWheel(ASender: TObject; Delta : Integer);
begin
end;

procedure MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent);
begin
end;

begin event MouseWheel(long  Delta)

end event MouseWheel

Private Sub MouseWheel(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseWheelEvent) Handles MouseWheel
End Sub

Private Sub MouseWheel(ByVal Delta As Long)
End Sub

Private Sub MouseWheel(ByVal Delta As Long)
End Sub

LPARAMETERS Delta

PROCEDURE OnMouseWheel(oGauge,Delta)

RETURN

Syntax for MouseWheel event, /COM version (others), on:

<SCRIPT EVENT="MouseWheel(Delta)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function MouseWheel(Delta)
End Function
</SCRIPT>

Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
End_Procedure

METHOD OCX_MouseWheel(Delta) CLASS MainDialog
RETURN NIL

void onEvent_MouseWheel(int   _Delta)
{
}

function MouseWheel as v (Delta  as  N)
end function

function nativeObject_MouseWheel(Delta)
return

The following sample rotates the first visible layer by 15% degrees ( up / down ), when the user rolls the mouse wheel:

VBA (MS Access, Excell...)

' MouseWheel event - Occurs when the mouse wheel moves while the control has focus
Private Sub Gauge1_MouseWheel(ByVal Delta As Long)
	With Gauge1
		With .Layers.Item("rotateOnWheel")
			.RotateAngle = Gauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
			Debug.Print( .RotateAngle )
		End With
	End With
End Sub

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

VB6

' MouseWheel event - Occurs when the mouse wheel moves while the control has focus
Private Sub Gauge1_MouseWheel(ByVal Delta As Long)
	With Gauge1
		With .Layers.Item("rotateOnWheel")
			.RotateAngle = Gauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
			Debug.Print( .RotateAngle )
		End With
	End With
End Sub

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

VB.NET

' MouseWheel event - Occurs when the mouse wheel moves while the control has focus
Private Sub Exgauge1_MouseWheel(ByVal sender As System.Object,ByVal Delta As Integer) Handles Exgauge1.MouseWheel
	With Exgauge1
		With .Layers.Item("rotateOnWheel")
			.RotateAngle = Exgauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
			Debug.Print( .RotateAngle )
		End With
	End With
End Sub

With Exgauge1
	.set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,1)
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
	.Layers.Item(0).Key = "rotateOnWheel"
End With

VB.NET for /COM

' MouseWheel event - Occurs when the mouse wheel moves while the control has focus
Private Sub AxGauge1_MouseWheel(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseWheelEvent) Handles AxGauge1.MouseWheel
	With AxGauge1
		With .Layers.Item("rotateOnWheel")
			.RotateAngle = AxGauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,e.delta)
			Debug.Print( .RotateAngle )
		End With
	End With
End Sub

With AxGauge1
	.set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,1)
	.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
	.Layers.Item(0).Key = "rotateOnWheel"
End With

C++

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void OnMouseWheelGauge1(long   Delta)
{
	/*
		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();
	EXGAUGELib::ILayerPtr var_Layer = spGauge1->GetLayers()->GetItem("rotateOnWheel");
		var_Layer->PutRotateAngle(spGauge1->FormatABC(L"A + (15 * B)",->GetLayers()->GetItem("rotateOnWheel")->GetRotateAngle(),Delta,vtMissing));
		OutputDebugStringW( _bstr_t(var_Layer->GetRotateAngle()) );
}

EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown();
spGauge1->PutDefaultLayer(EXGAUGELib::exDefLayerRotateType,long(1));
spGauge1->PutPicturesPath(L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
spGauge1->PutPicturesName(L"`Layer` + int(value  + 1) + `.png`");
spGauge1->GetLayers()->PutCount(11);
spGauge1->GetLayers()->GetItem(long(0))->PutKey("rotateOnWheel");

C++ Builder

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void __fastcall TForm1::Gauge1MouseWheel(TObject *Sender,long   Delta)
{
	Exgaugelib_tlb::ILayerPtr var_Layer = Gauge1->Layers->get_Item(TVariant("rotateOnWheel"));
		var_Layer->RotateAngle = ->FormatABC(L"A + (15 * B)",TVariant(Gauge1->Layers->get_Item(TVariant("rotateOnWheel"))->RotateAngle),TVariant(Delta),TNoParam());
		OutputDebugString( PChar(var_Layer->RotateAngle) );
}

Gauge1->DefaultLayer[Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerRotateType] = TVariant(1);
Gauge1->PicturesPath = L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
Gauge1->PicturesName = L"`Layer` + int(value  + 1) + `.png`";
Gauge1->Layers->Count = 11;
Gauge1->Layers->get_Item(TVariant(0))->set_Key(TVariant("rotateOnWheel"));

C#

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
private void exgauge1_MouseWheel(object sender,int   Delta)
{
	exontrol.EXGAUGELib.Layer var_Layer = exgauge1.Layers["rotateOnWheel"];
		var_Layer.RotateAngle = exgauge1.FormatABC("A + (15 * B)",.Layers["rotateOnWheel"].RotateAngle,Delta,null);
		System.Diagnostics.Debug.Print( var_Layer.RotateAngle.ToString() );
}
//this.exgauge1.MouseWheel += new exontrol.EXGAUGELib.exg2antt.MouseWheelEventHandler(this.exgauge1_MouseWheel);

exgauge1.set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,1);
exgauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
exgauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
exgauge1.Layers.Count = 11;
exgauge1.Layers[0].Key = "rotateOnWheel";

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="Gauge1" EVENT="MouseWheel(Delta)" LANGUAGE="JScript">
	var var_Layer = Gauge1.Layers.Item("rotateOnWheel");
		var_Layer.RotateAngle = Gauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta,null);
		alert( var_Layer.RotateAngle );
</SCRIPT>

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

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

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		With .Layers.Item("rotateOnWheel")
			.RotateAngle = Gauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
			alert( .RotateAngle )
		End With
	End With
End Function
</SCRIPT>

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

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

C# for /COM

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
private void axGauge1_MouseWheel(object sender, AxEXGAUGELib._IGaugeEvents_MouseWheelEvent e)
{
	EXGAUGELib.Layer var_Layer = axGauge1.Layers["rotateOnWheel"];
		var_Layer.RotateAngle = axGauge1.FormatABC("A + (15 * B)",.Layers["rotateOnWheel"].RotateAngle,e.delta,null);
		System.Diagnostics.Debug.Print( var_Layer.RotateAngle.ToString() );
}
//this.axGauge1.MouseWheel += new AxEXGAUGELib._IGaugeEvents_MouseWheelEventHandler(this.axGauge1_MouseWheel);

axGauge1.set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,1);
axGauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
axGauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
axGauge1.Layers.Count = 11;
axGauge1.Layers[0].Key = "rotateOnWheel";

X++ (Dynamics Ax 2009)

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
void onEvent_MouseWheel(int   _Delta)
{
	COM com_Layer;
	anytype var_Layer;
	;
	var_Layer = COM::createFromObject(exgauge1.Layers()).Item("rotateOnWheel"); com_Layer = var_Layer;
		com_Layer.RotateAngle(exgauge1.FormatABC("A + (15 * B)",.Layers().Item("rotateOnWheel").RotateAngle(),_Delta));
		print( com_Layer.RotateAngle() );
}

public void init()
{
	COM com_Layer;
	anytype var_Layer;
	;

	super();

	exgauge1.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(1));
	exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
	exgauge1.PicturesName("`Layer` + int(value  + 1) + `.png`");
	exgauge1.Layers().Count(11);
	var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
	com_Layer.Key("rotateOnWheel");
}

Delphi 8 (.NET only)

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent);
begin
	with AxGauge1 do
	begin
		with Layers.Item['rotateOnWheel'] do
		begin
			RotateAngle := .FormatABC('A + (15 * B)',TObject(AxGauge1.Layers.Item['rotateOnWheel'].RotateAngle),TObject(e.delta),Nil);
			OutputDebugString( RotateAngle );
		end;
	end
end;

with AxGauge1 do
begin
	set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(1));
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
	Layers.Item[TObject(0)].Key := 'rotateOnWheel';
end

Delphi (standard)

// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
procedure TForm1.Gauge1MouseWheel(ASender: TObject; Delta : Integer);
begin
	with Gauge1 do
	begin
		with Layers.Item['rotateOnWheel'] do
		begin
			RotateAngle := .FormatABC('A + (15 * B)',OleVariant(Gauge1.Layers.Item['rotateOnWheel'].RotateAngle),OleVariant(Delta),Null);
			OutputDebugString( RotateAngle );
		end;
	end
end;

with Gauge1 do
begin
	DefaultLayer[EXGAUGELib_TLB.exDefLayerRotateType] := OleVariant(1);
	PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
	Layers.Item[OleVariant(0)].Key := 'rotateOnWheel';
end

VFP

*** MouseWheel event - Occurs when the mouse wheel moves while the control has focus ***
LPARAMETERS Delta
	with thisform.Gauge1
		with .Layers.Item("rotateOnWheel")
			.RotateAngle = thisform.Gauge1.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
			DEBUGOUT( .RotateAngle )
		endwith
	endwith

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

dBASE Plus

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item("rotateOnWheel")
		var_Layer.RotateAngle = oGauge.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
		? Str(var_Layer.RotateAngle) 
return

local oGauge

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Template = [DefaultLayer(185) = 1] // oGauge.DefaultLayer(185) = 1
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11
oGauge.Layers.Item(0).Key = "rotateOnWheel"

XBasic (Alpha Five)

' Occurs when the mouse wheel moves while the control has focus
function MouseWheel as v (Delta  as  N)
	Dim var_Layer as P
	oGauge = topparent:CONTROL_ACTIVEX1.activex
	var_Layer = oGauge.Layers.Item("rotateOnWheel")
		var_Layer.RotateAngle = oGauge.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
		? var_Layer.RotateAngle 
end function

Dim oGauge as P

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

Visual Objects

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,"rotateOnWheel"]
		var_Layer:RotateAngle := oDCOCX_Exontrol1:FormatABC("A + (15 * B)",:Layers:[Item,"rotateOnWheel"]:RotateAngle,Delta,nil)
		OutputDebugString(String2Psz( AsString(var_Layer:RotateAngle) ))
RETURN NIL


oDCOCX_Exontrol1:[DefaultLayer,exDefLayerRotateType] := 1
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
oDCOCX_Exontrol1:Layers:[Item,0]:Key := "rotateOnWheel"

PowerBuilder

/*begin event MouseWheel(long  Delta) - Occurs when the mouse wheel moves while the control has focus*/
/*
	OleObject var_Layer
	oGauge = ole_1.Object
	var_Layer = oGauge.Layers.Item("rotateOnWheel")
		var_Layer.RotateAngle = oGauge.FormatABC("A + (15 * B)",.Layers.Item("rotateOnWheel").RotateAngle,Delta)
		MessageBox("Information",string( String(var_Layer.RotateAngle) ))
*/
/*end event MouseWheel*/

OleObject oGauge

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

Visual DataFlex

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	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 "rotateOnWheel" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Variant vA
				Variant voLayers1
				Get ComLayers to voLayers1
				Handle hoLayers1
				Get Create (RefClass(cComLayers)) to hoLayers1
				Set pvComObject of hoLayers1 to voLayers1
					Variant voLayer1
					Get ComItem of hoLayers1 "rotateOnWheel" to voLayer1
					Handle hoLayer1
					Get Create (RefClass(cComLayer)) to hoLayer1
					Set pvComObject of hoLayer1 to voLayer1
						Get ComRotateAngle of hoLayer1 to vA
					Send Destroy to hoLayer1
				Send Destroy to hoLayers1
				Get ComFormatABC "A + (15 * B)" vA llDelta Nothing to v
			Set ComRotateAngle of hoLayer to v
			Showln (ComRotateAngle(hoLayer))
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComDefaultLayer OLEexDefLayerRotateType to 1
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Set ComCount of hoLayers2 to 11
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 0 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComKey of hoLayer2 to "rotateOnWheel"
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
End_Procedure

XBase++

PROCEDURE OnMouseWheel(oGauge,Delta)
	LOCAL oLayer
	oLayer := oGauge:Layers:Item("rotateOnWheel")
		oLayer:RotateAngle := oGauge:FormatABC("A + (15 * B)",:Layers:Item("rotateOnWheel"):RotateAngle(),Delta)
		DevOut( Transform(oLayer:RotateAngle(),"") )
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:MouseWheel := {|Delta| OnMouseWheel(oGauge,Delta)} /*Occurs when the mouse wheel moves while the control has focus*/

		oGauge:SetProperty("DefaultLayer",185/*exDefLayerRotateType*/,1)
		oGauge:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		oGauge:PicturesName := "`Layer` + int(value  + 1) + `.png`"
		oGauge:Layers():Count := 11
		oGauge:Layers:Item(0):Key := "rotateOnWheel"

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