58:
Tic Tac Toe Game

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Click = class::nativeObject_Click
endwith
*/
// Occurs when the user presses and then releases the left mouse button over the control.
function nativeObject_Click()
	/* Left = Me.Layers(l).Left */
	/* Top = Me.Layers(l).Top */
	/* Width = Me.Layers(l).Width */
	/* Height = Me.Layers(l).Height */
	local l,var_Layer,var_Layers,var_Picture
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	l = oGauge.LayerFromPoint(-1,-1)
	var_Layers = oGauge.Layers
		var_Layer = var_Layers.Add(oGauge.Layers.Count)
			var_Picture = var_Layer.Background.Picture
				var_Picture.Left = "8"
				var_Picture.Width = "width - 2 * 8"
				var_Picture.Top = "8"
				var_Picture.Height = "height - 2 * 8"
				var_Picture.Name = oGauge.FormatABC("A mod 2 = 0 ? `x` : `o`",oGauge.Layers.Count)
			var_Layer.Transparency = 0
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABS0IQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAZAEiWIovRbHMBzFIMYRFFCcIRGSaYDiCNovTRNE7TfBMIhkGoSaKpCIRVDCSYJUzTc6wS79KgAASiJjjao6ZhaSpSABRYiyXRlHSxLiuYyoGTrJACEQxDhEEIjGLAazLMadJItCzabqGbJ8Ro6cQwTAIgI=")
oGauge.Template = [DefaultLayer(18) = "width/3"] // oGauge.DefaultLayer(18) = "width/3"
oGauge.Template = [DefaultLayer(19) = "height/3"] // oGauge.DefaultLayer(19) = "height/3"
oGauge.Template = [HTMLPicture("x") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\x.png"] // oGauge.HTMLPicture("x") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\x.png"
oGauge.Template = [HTMLPicture("o") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\o.png"] // oGauge.HTMLPicture("o") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\o.png"
oGauge.LayerAutoSize = -1
oGauge.Layers.Count = 9
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Color.Value = 0x1000000
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Left = " width/3 - 4"
	var_Layer1.Background.Color.Value = 0x1000000
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.Left = "2 * (width/3 - 4) - 4"
	var_Layer2.Background.Color.Value = 0x1000000
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Top = "height/3 - 4"
	var_Layer3.Background.Color.Value = 0x1000000
var_Layer4 = oGauge.Layers.Item(4)
	var_Layer4.Top = "height/3 - 4"
	var_Layer4.Left = " width/3 - 4"
	var_Layer4.Background.Color.Value = 0x1000000
var_Layer5 = oGauge.Layers.Item(5)
	var_Layer5.Top = "height/3 - 4"
	var_Layer5.Left = "2 * (width/3 - 4) - 4"
	var_Layer5.Background.Color.Value = 0x1000000
var_Layer6 = oGauge.Layers.Item(6)
	var_Layer6.Top = "2 * (height/3 - 4) "
	var_Layer6.Background.Color.Value = 0x1000000
var_Layer7 = oGauge.Layers.Item(7)
	var_Layer7.Top = "2 * (height/3 - 4) "
	var_Layer7.Left = " width/3 - 4"
	var_Layer7.Background.Color.Value = 0x1000000
var_Layer8 = oGauge.Layers.Item(8)
	var_Layer8.Top = "2 * (height/3 - 4) "
	var_Layer8.Left = "2 * (width/3 - 4) - 4"
	var_Layer8.Background.Color.Value = 0x1000000
oGauge.Template = [DefaultLayer(22) = 99] // oGauge.DefaultLayer(22) = 99
oGauge.EndUpdate()

57:
What's the difference Rotate vs Rotamove

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

local oGauge,var_Foreground,var_Foreground1,var_Layer,var_Layer1,var_Layer2,var_Layers,var_Picture,var_Picture1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.AllowSmoothChange = 0
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Button with LEDs"
var_Layers = oGauge.Layers
	var_Layer = var_Layers.Add("base")
	var_Layer1 = var_Layers.Add("rotate")
		var_Layer1.ToolTip = Str(var_Layer1.Key)
		var_Picture = var_Layer1.Background.Picture
			var_Picture.Name = "Example Button Up.png"
			var_Picture.Left = "width/2"
			var_Picture.Top = "height/2"
			var_Picture.Width = Str(128)
			var_Picture.Height = Str(64)
		var_Foreground = var_Layer1.Foreground
			// var_Foreground.Caption(0) = "<font ;14><sha ;;0>Rotate"
			with (oGauge)
				TemplateDef = [dim var_Foreground]
				TemplateDef = var_Foreground
				Template = [var_Foreground.Caption(0) = "<font ;14><sha ;;0>Rotate"]
			endwith
			// var_Foreground.Caption(4) = "width/2 + 32"
			with (oGauge)
				TemplateDef = [dim var_Foreground]
				TemplateDef = var_Foreground
				Template = [var_Foreground.Caption(4) = "width/2 + 32"]
			endwith
			// var_Foreground.Caption(5) = "height/2 + 16"
			with (oGauge)
				TemplateDef = [dim var_Foreground]
				TemplateDef = var_Foreground
				Template = [var_Foreground.Caption(5) = "height/2 + 16"]
			endwith
		// var_Layer1.Brightness(1) = 100
		with (oGauge)
			TemplateDef = [dim var_Layer1]
			TemplateDef = var_Layer1
			Template = [var_Layer1.Brightness(1) = 100]
		endwith
		var_Layer1.OnDrag = 2
		var_Layer1.RotateAngle = 45
	var_Layer2 = var_Layers.Add("rotamove")
		var_Layer2.ToolTip = Str(var_Layer2.Key)
		var_Picture1 = var_Layer2.Background.Picture
			var_Picture1.Name = "Example Button Up.png"
			var_Picture1.Left = "width/2"
			var_Picture1.Top = "height/2"
			var_Picture1.Width = Str(128)
			var_Picture1.Height = Str(64)
		var_Foreground1 = var_Layer2.Foreground
			// var_Foreground1.Caption(0) = "<font ;14><sha ;;0>Rotamove"
			with (oGauge)
				TemplateDef = [dim var_Foreground1]
				TemplateDef = var_Foreground1
				Template = [var_Foreground1.Caption(0) = "<font ;14><sha ;;0>Rotamove"]
			endwith
			// var_Foreground1.Caption(4) = "width/2 + 24"
			with (oGauge)
				TemplateDef = [dim var_Foreground1]
				TemplateDef = var_Foreground1
				Template = [var_Foreground1.Caption(4) = "width/2 + 24"]
			endwith
			// var_Foreground1.Caption(5) = "height/2 + 16"
			with (oGauge)
				TemplateDef = [dim var_Foreground1]
				TemplateDef = var_Foreground1
				Template = [var_Foreground1.Caption(5) = "height/2 + 16"]
			endwith
		// var_Layer2.Brightness(2) = 100
		with (oGauge)
			TemplateDef = [dim var_Layer2]
			TemplateDef = var_Layer2
			Template = [var_Layer2.Brightness(2) = 100]
		endwith
		var_Layer2.RotateAngle = 45
		var_Layer2.Transparency = 25
		var_Layer2.OnDrag = 3

56:
How do I display a tooltip, when cursor hovers the layer

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseIn = class::nativeObject_MouseIn
endwith
*/
// Notifies that the cursor enters the layer.
function nativeObject_MouseIn(Layer)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(9).ToolTip = Str(oGauge.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oGauge.Value))
return

local oGauge,var_Layer

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 = 10
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"
oGauge.Layers.Item(3).Visible = false
oGauge.Layers.Item(4).Visible = false
oGauge.Layers.Item(9).Value = 25
oGauge.EndUpdate()

55:
I've noticed that the OnDrag can move the layer itself, but how about moving the clipping region

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Layers(DragInfo.Layer).Clip.Ellipse */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

local oGauge,var_ClipEllipse,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.BackColor = 0xd9d9d9
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
var_Layer = oGauge.Layers.Add("background")
	var_Layer.Background.Picture.Name = "Guage_Background.png"
	var_ClipEllipse = var_Layer.Clip.Ellipse
		var_ClipEllipse.RadiusX = "width/3"
		var_ClipEllipse.RadiusY = "height/3"
// oGauge.Layers.Add("needle").Background.Picture.Name = "Guage_Needle.png"
var_Picture = oGauge.Layers.Add("needle").Background.Picture
with (oGauge)
	TemplateDef = [dim var_Picture]
	TemplateDef = var_Picture
	Template = [var_Picture.Name = "Guage_Needle.png"]
endwith
oGauge.EndUpdate()

54:
How do I show a portion of layer with a different color (sample 2)

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Layer,var_Layers
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item("Color").Clip.Value = oGauge.Layers.Item("Thumb").RotateAngle
	var_Layer = oGauge.Layers.Item("Color")
		// var_Layer.Brightness(3) = var_Layer.RotateAngle
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(3) = RotateAngle]
		endwith
	// oGauge.Layers.Item("Thumb").Brightness(3) = oGauge.Layers.Item("Color").RotateAngle
	var_Layers = oGauge.Layers.Item("Thumb")
	with (oGauge)
		TemplateDef = [dim var_Layers]
		TemplateDef = var_Layers
		Template = [var_Layers.Brightness(3) = Me.Layers.Item("Color").RotateAngle]
	endwith
return

local oGauge,var_ClipEllipse,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 5
oGauge.Layers.Item(1).Visible = false
var_Layer = oGauge.Layers.Item(4)
	var_Layer.Key = "Thumb"
	var_Layer.DefaultRotateAngle = -141
	var_Layer.OnDrag = 2
	var_Layer.RotateType = 2
	// var_Layer.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer]
		TemplateDef = var_Layer
		Template = [var_Layer.Brightness(0) = 0]
	endwith
	// var_Layer.Brightness(1) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer]
		TemplateDef = var_Layer
		Template = [var_Layer.Brightness(1) = 100]
	endwith
var_Layer1 = oGauge.Layers.Add("Color")
	var_Layer1.OnDrag = 2
	var_Layer1.Position = 3
	// var_Layer1.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(0) = 0]
	endwith
	// var_Layer1.Brightness(1) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(1) = 100]
	endwith
	var_Layer1.Background.Picture.Name = "Layer3.png"
	var_Layer1.Clip.Pie.SweepAngle = "value"
	var_ClipEllipse = var_Layer1.Clip.Ellipse
		var_ClipEllipse.RadiusX = "150"
		var_ClipEllipse.RadiusY = "150"
		var_ClipEllipse.InverseClip = true
oGauge.Layers.Item("Thumb").RotateAngle = 135
oGauge.EndUpdate()

53:
How do I show a portion of layer with a different color (sample 1)

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Layer,var_Layers
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item("Color").Clip.Value = oGauge.Layers.Item("Thumb").RotateAngle
	var_Layer = oGauge.Layers.Item("Color")
		// var_Layer.Brightness(3) = var_Layer.RotateAngle
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(3) = RotateAngle]
		endwith
	// oGauge.Layers.Item("Thumb").Brightness(3) = oGauge.Layers.Item("Color").RotateAngle
	var_Layers = oGauge.Layers.Item("Thumb")
	with (oGauge)
		TemplateDef = [dim var_Layers]
		TemplateDef = var_Layers
		Template = [var_Layers.Brightness(3) = Me.Layers.Item("Color").RotateAngle]
	endwith
return

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 5
oGauge.Layers.Item(1).Visible = false
var_Layer = oGauge.Layers.Item(4)
	var_Layer.Key = "Thumb"
	var_Layer.DefaultRotateAngle = -141
	var_Layer.OnDrag = 2
	var_Layer.RotateType = 2
	// var_Layer.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer]
		TemplateDef = var_Layer
		Template = [var_Layer.Brightness(0) = 0]
	endwith
	// var_Layer.Brightness(2) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer]
		TemplateDef = var_Layer
		Template = [var_Layer.Brightness(2) = 100]
	endwith
var_Layer1 = oGauge.Layers.Add("Color")
	var_Layer1.OnDrag = 2
	var_Layer1.Position = 3
	// var_Layer1.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(0) = 0]
	endwith
	// var_Layer1.Brightness(2) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(2) = 100]
	endwith
	var_Layer1.Background.Picture.Name = "Layer3.png"
	var_Layer1.Clip.Pie.SweepAngle = "value"
oGauge.Layers.Item("Thumb").RotateAngle = 135
oGauge.EndUpdate()

52:
How can I display / clip a picture with no transparency

local oGauge,var_ClipPicture,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
var_Layer = oGauge.Layers.Add("default")
	var_Layer.OnDrag = 1
	var_Layer.Background.Picture.Name = "Layer2.png"
	var_Layer.DefaultOffsetY = -164
var_Layer1 = oGauge.Layers.Add("notransparency")
	var_Layer1.OnDrag = 1
	var_Layer1.Background.Picture.Name = "Layer2.png"
	var_ClipPicture = var_Layer1.Clip.Picture
		var_ClipPicture.Name = oGauge.Layers.Item("notransparency").Background.Picture.Name
		var_ClipPicture.AlphaTo = "128"
	var_Layer1.Grayscale = true
oGauge.EndUpdate()

51:
How can I resize all layers

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 5
var_Layer = oGauge.Layers.Add("autosize")
	var_Layer.Visible = false
	var_Layer.Width = Str(164)
	var_Layer.Height = Str(128)
oGauge.LayerAutoSize = oGauge.Layers.Item("autosize").Index
oGauge.EndUpdate()

50:
How can I start moving any layer when user clicks it

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* Layers(DragInfo.Layer).OnDrag = 1 */
	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

49:
How can I prevent dragging the layers when user right click it
/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* Cancel = Me.FormatABC("A=2",DragInfo.Button) */
	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
oGauge.Layers.Item(0).OnDrag = 1

48:
Is your control DPI-Aware

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 11
oGauge.Layers.Item(3).Grayscale = true
oGauge.Layers.Item(4).Grayscale = true
var_Layer = oGauge.Layers.Item(10)
	var_Layer.Width = "128 * dpix"
	var_Layer.Height = "128 * dpiy"
oGauge.Layers.Item(9).OnDrag = 2
oGauge.LayerAutoSize = 10

47:
Is it possible to make the control transparent, I would like to put the control on a form, then make the form transparent so the control appears on the desktop with just the images contained in the layers visible

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 10
var_Layer = oGauge.Layers.Item(9)
	var_Layer.RotateType = 2
	var_Layer.OnDrag = 2
oGauge.AllowMoveOnClick = true
oGauge.LayerUpdate = 2

46:
How can I show the layers on perspective

local oGauge

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

45:
Is it possible to resize all layers after they are loaded (method 2)

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 11
oGauge.Layers.Item(3).Grayscale = true
oGauge.Layers.Item(4).Grayscale = true
oGauge.Layers.Item(9).OnDrag = 2
var_Layer = oGauge.Layers.Item(10)
	var_Layer.Width = Str(128)
	var_Layer.Height = Str(128)
oGauge.LayerAutoSize = 10

44:
Is it possible to resize all layers after they are loaded (method 1)

local oGauge

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 10
oGauge.Layers.Item(3).Grayscale = true
oGauge.Layers.Item(4).Grayscale = true
oGauge.LayerAutoSize = -1

43:
Is it possible to load images for different layers from different folders

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 12
oGauge.Layers.Item(0).Background.Picture.Name = "\..\Clock\vista_clock.png"
oGauge.Layers.Item(9).Background.Picture.Name = "\..\Knob 2\Layer3.png"
oGauge.Layers.Item(10).Background.Picture.Name = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noBack.png"
var_Layer = oGauge.Layers.Item(11)
	var_Layer.DefaultOffsetX = 64
	var_Layer.DefaultOffsetY = -36
	var_Picture = var_Layer.Background.Picture
		var_Picture.Name = "gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQEX5JIhBKhYQrFSxNNhUKoUY7/c6+R6+a7pPg0UAjaISTQwCzMEgtWQ2IyDBJJMYiNJCJgTVJuMghNTcSgFAxlNZiMinYKNRQ2NxMBhWNQkSRUAQkRRNEhYEBhMogMADOwGfY6N7eXb3DgXeamZgMGbQIStE55RZ7c7ce7/XpzZycOaBf7ZNAlZwiGQIMAnQBnAL4ACKAACABXADMAY4BLgHYiXS6VQAESyDbAHYAGwvea9E4BXhPIgXD4KQCZD4FeAJzqWFLcNQf1KkSgyFYGMDmVoAEwAHjxQDiOo7AbgKqlaj8WQBRgxDYBfmabpDRTXdumF5ZSwVboXIBrToAhgBIwHWFREvoNZtlsb42G6Kg2g4b59AeYgAnAMpWnqBZWk2JoIkQcY8AGQAvgAPBWkcScUnceh6FoLYWAsepsGwLBsCcMIMh8C4AHYOAODOVIUHaYwviKMgvh2eIxmORxcnHJ5MjYExBlmM5nBAVgqGodY9nuFxXGoA5al8WIJmAe5OgAIxtD6bJUimU5uC4GxFiOaxXkOc59lwOh0kkFYREWFZ6iSdhiiMQBSg0VArFWAZ0CgepijEKJdlcBZnnuaJ2n2PBZCgaAHnESZsHmRpFlKBBECQY5hA2DoOgaYYYCoC4zjObpAkCAJ+mVGgQBEFZ7CSVgbgYYYGk8c4ugODRFFgKRUnYAZ4C8E5ECqWwOl8d5/gcGgjmALQRjiU" ;
 +"BQmg9oVDWBAIFoAZ8DmBoAlcWoBlwWAjHEK5pnSehpDALR9A2U1+FWAB3B2X4rmCJwaBcLQNmiG4AG8do6FkLRWjEOw7GsEwRBQUogCIEBRH0LJEAQeR8h4c55jyXwDmAK9TlMLIoBcS4pgAZwBGwaB3FIGIDBHopsmWS4Xh2HpUgoPhvkOcYcWANBWiCIh5GicJhnKUOvCcJp0CIGxNg6doEIUUopHSGoAA+OhhFeKgVBoGIYnCfo7HcTgdhuG4zkWBB68GdJmkKQQPcSVx6Hue47l0foMAAZ5yjkXJTBoW5ekgSglFKZ4AAYO5BDwIAdkgZZykcWg3G8OoPlgNpDicT4fH6AwZk+M4zDEMwZGMVB9GGZgqGeO51kmfAbnyGQZjSVofmeepzB8Nojmqah+gQEAzCsKfvgoI5oniYOvCCZaghiWfeiWNY2mOOJ2CMKJyDUVpOhwR38EcDpWlq/4Ox6xLAxCMIkRAShQCoC4C4D42RaCpH+BAGY1wDiDFoGgbwFQIjbHuH0Y48x+BUCeE8O47h0DRBeN8FwFAFC7ESMgJ4AAOARFyCsOQSgIhbEsK0FoywZC2DaOsFAig3DOGYMwPguAzjPE8G8QZFT1ghEA5IG4QhaHIB4M8JragUitDqK5jIrhvj2HoLYU49hHjvA+NsWQZRligHWLoDwRAkAaGcBICIExIshBwAgQQ8ojjMCeAcB4Hh8DiGMI0X4rhiixEyNcLQBwRASAEIgKAKxjB7CMEAfIfhbjrB0E4" &
 +"JQGxOgWEiF4CIzhFjgDi+gfQdh2jaBqLQPo+x7CNHSEwYwfwWCfHeA5WYXgsBYAQG4bougag/B6P0eYHwpg/A4D8F4pBXArGQJwRI9RviGHyDYQARQAAVAAPoTwAACCQGoCADgrxljzF0KwVwbgDBnGIJIDgGxnCxHgDoGInAxhmC+O4agjwUCQBMEIVAiA3ALCiMkRAKgAhcGsHEKgTg3BFikGoEQ3hqCkE0DsMILQbgCGADgVwGwsiOCKCYGQBBAgREiKoRABIkATGYK4AAThJAGBCEACYEAEhRGKBAFoCAmBgEYAkSQCQthtEuPsWwAAkgUCIAARzUgnD3HoHAS46xMDFWgDUbQLAlDMgiKsFwIw2AzGwEoUQJXQjXCIGIAwQhUh9DiJQBAxwQAwFID0IA2wjCkCQBEBYUw3g2AWMsKwNAvgqFWLQJIOwbAcBOEIMgLwxDRGkNACw7gAAwDUPkRokwYBrCKKQLo1xKhIDWGEMYOhnCGD+AETIaBOCABEEYVY0yI1SCKE4IgrghBgEEQEA="
		var_Picture.Width = Str(64)
		var_Picture.Height = Str(64)

42:
How can I specify whether an object can be selected or not

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	? Str(oGauge.LayerFromPoint(-1,-1)) 
return

local oGauge,var_Foreground,var_Foreground1,var_Layer,var_Layer1,var_Picture,var_Picture1

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 = 12
var_Layer = oGauge.Layers.Item(10)
	var_Layer.RotateType = 2
	var_Layer.OnDrag = 2
	var_Picture = var_Layer.Background.ExtraPicture("extra1")
		var_Picture.Name = "Layer1.png"
		var_Picture.Left = "32"
		var_Picture.Top = "32"
		var_Picture.Width = Str(64)
		var_Picture.Height = Str(64)
	var_Foreground = var_Layer.Foreground
		// var_Foreground.Caption(0) = "<sha ;;0>selectable"
		with (oGauge)
			TemplateDef = [dim var_Foreground]
			TemplateDef = var_Foreground
			Template = [var_Foreground.Caption(0) = "<sha ;;0>selectable"]
		endwith
		// var_Foreground.Caption(4) = 38
		with (oGauge)
			TemplateDef = [dim var_Foreground]
			TemplateDef = var_Foreground
			Template = [var_Foreground.Caption(4) = 38]
		endwith
		// var_Foreground.Caption(5) = -5
		with (oGauge)
			TemplateDef = [dim var_Foreground]
			TemplateDef = var_Foreground
			Template = [var_Foreground.Caption(5) = -5]
		endwith
var_Layer1 = oGauge.Layers.Item(11)
	var_Picture1 = var_Layer1.Background.ExtraPicture("extra2")
		var_Picture1.Name = "Layer1.png"
		var_Picture1.Left = "width-64"
		var_Picture1.Top = "height-84 - 32"
		var_Picture1.Width = Str(64)
		var_Picture1.Height = Str(64)
		var_Picture1.Selectable = false
	// var_Layer1.Brightness(0) = 25
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(0) = 25]
	endwith
	var_Foreground1 = var_Layer1.Foreground
		// var_Foreground1.Caption(0) = "<sha ;;0>not selectable"
		with (oGauge)
			TemplateDef = [dim var_Foreground1]
			TemplateDef = var_Foreground1
			Template = [var_Foreground1.Caption(0) = "<sha ;;0>not selectable"]
		endwith
		// var_Foreground1.Caption(3) = 8
		with (oGauge)
			TemplateDef = [dim var_Foreground1]
			TemplateDef = var_Foreground1
			Template = [var_Foreground1.Caption(3) = 8]
		endwith
		// var_Foreground1.Caption(5) = "height-theight/4"
		with (oGauge)
			TemplateDef = [dim var_Foreground1]
			TemplateDef = var_Foreground1
			Template = [var_Foreground1.Caption(5) = "height-theight/4"]
		endwith
oGauge.EndUpdate()

41:
How do I get the layer/object/picture from the cursor
/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	? Str(oGauge.LayerFromPoint(-1,-1)) 
return

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 10
var_Layer = oGauge.Layers.Item(9)
	var_Layer.RotateType = 2
	var_Layer.OnDrag = 2

40:
How can I display a speedometer

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Picture,var_Picture1
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item("arc").Clip.Value = oGauge.Value
	// oGauge.Layers.Item("noDigit").Background.ExtraPicture("80").Name = oGauge.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",oGauge.Value)
	var_Picture = oGauge.Layers.Item("noDigit").Background.ExtraPicture("80")
	with (oGauge)
		TemplateDef = [dim var_Picture]
		TemplateDef = var_Picture
		Template = [Me.Layers.Item("noDigit").Background.ExtraPicture("80").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",Me.Value)]
	endwith
	// oGauge.Layers.Item("noDigit").Background.ExtraPicture("08").Name = oGauge.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",oGauge.Value)
	var_Picture1 = oGauge.Layers.Item("noDigit").Background.ExtraPicture("08")
	with (oGauge)
		TemplateDef = [dim var_Picture1]
		TemplateDef = var_Picture1
		Template = [Me.Layers.Item("noDigit").Background.ExtraPicture("08").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",Me.Value)]
	endwith
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value + B",oGauge.Value,Delta)
return

local oGauge,var_ClipPie,var_ClipPie1,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Picture,var_Picture1,var_Picture2,var_Picture3

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.BackColor = 0x282828
oGauge.AllowSmoothChange = 0
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
oGauge.Layers.Count = 6
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Key = "arcBack"
	var_Layer.Background.Picture.Name = "noArcBack.png"
	var_ClipPie = var_Layer.Clip.Pie
		var_ClipPie.StartAngle = Str(240)
		var_ClipPie.SweepAngle = Str(240)
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Key = "arc"
	var_Layer1.Background.Picture.Name = "noArc.png"
	var_ClipPie1 = var_Layer1.Clip.Pie
		var_ClipPie1.StartAngle = Str(240)
		var_ClipPie1.SweepAngle = "value/100 * 240"
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.RotateType = 2
	var_Layer2.Key = "pointer"
	var_Layer2.Background.Picture.Name = "noLine.png"
	var_Layer2.DefaultRotateAngle = 240
	var_Layer2.RotateAngleToValue = "value/240 * 100"
	var_Layer2.ValueToRotateAngle = "value / 100 * 240"
	var_Layer2.RotateAngleValid = "value > 240 ? (value > 300 ? 0 : 240) : value"
	var_Layer2.OnDrag = 2
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Key = "noBack"
	var_Layer3.Left = "(width - 55 * 2)/2"
	var_Layer3.Top = "(height - 94 * 1)/2"
	var_Layer3.Width = "2 * 45 + 8"
	var_Layer3.Height = "1 * 94"
	var_Layer3.Transparency = 90
	var_Picture = var_Layer3.Background.ExtraPicture("80")
		var_Picture.Name = "noBack.png"
		var_Picture.Left = "-4"
		var_Picture.Width = "70"
	var_Picture1 = var_Layer3.Background.ExtraPicture("08")
		var_Picture1.Name = "noBack.png"
		var_Picture1.Left = "36"
		var_Picture1.Width = Str(70)
var_Layer4 = oGauge.Layers.Item(4)
	var_Layer4.Key = "noDigit"
	var_Layer4.Left = "(width - 55 * 2)/2"
	var_Layer4.Top = "(height - 94 * 1)/2"
	var_Layer4.Width = "2 * 45 + 8"
	var_Layer4.Height = "1 * 94"
	var_Picture2 = var_Layer4.Background.ExtraPicture("80")
		var_Picture2.Name = "no1.png"
		var_Picture2.Left = "-4"
		var_Picture2.Width = "70"
	var_Picture3 = var_Layer4.Background.ExtraPicture("08")
		var_Picture3.Name = "no2.png"
		var_Picture3.Left = "36"
		var_Picture3.Width = Str(70)
var_Layer5 = oGauge.Layers.Item(5)
	var_Layer5.Key = "noCap"
	var_Layer5.Background.Picture.Name = "noCap.png"
	var_Layer5.Transparency = 45
oGauge.Layers.Item("pointer").Position = oGauge.Layers.Item("noCap").Position
oGauge.LayerOfValue = oGauge.Layers.Item("pointer").Index
oGauge.Value = 56
oGauge.EndUpdate()

39:
How can I display LED-numbers

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Picture,var_Picture1
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value MIN 0 MAX 99",.Value)
	// oGauge.Layers.Item("noDigit").Background.ExtraPicture("80").Name = oGauge.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",oGauge.Value)
	var_Picture = oGauge.Layers.Item("noDigit").Background.ExtraPicture("80")
	with (oGauge)
		TemplateDef = [dim var_Picture]
		TemplateDef = var_Picture
		Template = [Me.Layers.Item("noDigit").Background.ExtraPicture("80").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",Me.Value)]
	endwith
	// oGauge.Layers.Item("noDigit").Background.ExtraPicture("08").Name = oGauge.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",oGauge.Value)
	var_Picture1 = oGauge.Layers.Item("noDigit").Background.ExtraPicture("08")
	with (oGauge)
		TemplateDef = [dim var_Picture1]
		TemplateDef = var_Picture1
		Template = [Me.Layers.Item("noDigit").Background.ExtraPicture("08").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",Me.Value)]
	endwith
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value + B",oGauge.Layers.Item("noDigit").Value,Delta)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Timer = class::nativeObject_Timer
endwith
*/
// Occurs when the interval elapses.
function nativeObject_Timer(TickCount)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value = 99 ? 0 : ( value  + B )",oGauge.Value,1)
return

local oGauge,var_Layer,var_Layer1,var_Picture,var_Picture1,var_Picture2,var_Picture3

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.AllowSmoothChange = 0
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
oGauge.Layers.Count = 3
var_Layer = oGauge.Layers.Item(1)
	var_Layer.Key = "noBack"
	var_Layer.Left = "(width - 55 * 2)/2"
	var_Layer.Top = "(height - 94 * 1)/2"
	var_Layer.Width = "2 * 45 + 8"
	var_Layer.Height = "1 * 94"
	var_Layer.Transparency = 90
	var_Picture = var_Layer.Background.ExtraPicture("80")
		var_Picture.Name = "noBack.png"
		var_Picture.Left = "-4"
		var_Picture.Width = "70"
	var_Picture1 = var_Layer.Background.ExtraPicture("08")
		var_Picture1.Name = "noBack.png"
		var_Picture1.Left = "36"
		var_Picture1.Width = Str(70)
var_Layer1 = oGauge.Layers.Item(2)
	var_Layer1.Key = "noDigit"
	var_Layer1.Left = "(width - 55 * 2)/2"
	var_Layer1.Top = "(height - 94 * 1)/2"
	var_Layer1.Width = "2 * 45 + 8"
	var_Layer1.Height = "1 * 94"
	var_Picture2 = var_Layer1.Background.ExtraPicture("80")
		var_Picture2.Name = "no1.png"
		var_Picture2.Left = "-4"
		var_Picture2.Width = "70"
	var_Picture3 = var_Layer1.Background.ExtraPicture("08")
		var_Picture3.Name = "no2.png"
		var_Picture3.Left = "36"
		var_Picture3.Width = Str(70)
oGauge.LayerOfValue = oGauge.Layers.Item("noDigit").Index
oGauge.Value = 73
oGauge.TimerInterval = 100
oGauge.EndUpdate()

38:
How can I display a simple knob, to fit the control's client area

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.LayerAutoSize = -1
oGauge.Template = [DefaultLayer(18) = "width MAX height"] // oGauge.DefaultLayer(18) = "width MAX height"
oGauge.Template = [DefaultLayer(19) = "width MAX height"] // oGauge.DefaultLayer(19) = "width MAX height"
oGauge.Layers.Count = 5
var_Layer = oGauge.Layers.Item(4)
	var_Layer.OnDrag = 3
	var_Layer.DefaultRotateAngle = -142

37:
How can I display a switch

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Click = class::nativeObject_Click
endwith
*/
// Occurs when the user presses and then releases the left mouse button over the control.
function nativeObject_Click()
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("(value + 1) mod 2",.Value)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragEnd = class::nativeObject_DragEnd
endwith
*/
// Occurs once the user ends dragging a layer.
function nativeObject_DragEnd(DragInfo,Cancel)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("(value < 24 ? 0 : 1)",oGauge.Layers.Item("knob").OffsetX)
return

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

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value > 0 ? 1 : 0",Delta)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Picture,var_Picture1,var_Picture2

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch"
oGauge.Layers.Count = 4
oGauge.Layers.Item(0).Background.Picture.Name = "background.png"
var_Layer = oGauge.Layers.Item(1)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Name = "Indicator_ON.png"
		var_Picture.DisplayAs = 16
	var_Layer.OffsetXValid = Str(48)
	var_Layer.OffsetYValid = Str(0)
var_Layer1 = oGauge.Layers.Item(2)
	var_Picture1 = var_Layer1.Background.Picture
		var_Picture1.Name = "Indicator_OFF.png"
		var_Picture1.DisplayAs = 18
	var_Layer1.OffsetXValid = Str(-12)
	var_Layer1.OffsetYValid = Str(0)
var_Layer2 = oGauge.Layers.Item(3)
	var_Layer2.OnDrag = 1
	var_Layer2.Key = "knob"
	var_Picture2 = var_Layer2.Background.Picture
		var_Picture2.Name = "knob.png"
		var_Picture2.DisplayAs = 17
	var_Layer2.DefaultOffsetY = "9"
	var_Layer2.DefaultOffsetX = "-5"
	var_Layer2.OffsetYValid = "0"
	var_Layer2.ValueToOffsetX = "value = 0 ? 0 : 48"
	var_Layer2.OffsetToValue = "value = 0 ? 0 : 1"
	var_Layer2.OffsetXValid = "(value MIN 0 MAX 48)"
oGauge.LayerOfValue = oGauge.Layers.Item("knob").Index
oGauge.Value = 1

36:
How can I colorize the layer

/*
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 = [Caption(0) = FormatABC("` Value: <b>` + (value format ``)",Layers.Item(4).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (value format ``)",oGauge.Layers.Item(4).Value)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Click = class::nativeObject_Click
endwith
*/
// Occurs when the user presses and then releases the left mouse button over the control.
function nativeObject_Click()
	local var_Object
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Object = oGauge.Layers.Item(oGauge.LayerFromPoint(-1,-1))
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseIn = class::nativeObject_MouseIn
endwith
*/
// Notifies that the cursor enters the layer.
function nativeObject_MouseIn(Layer)
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(Layer)
		// var_Layer.Brightness(1) = 100
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(1) = 100]
		endwith
		// var_Layer.Brightness(2) = 0
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(2) = 0]
		endwith
		// var_Layer.Brightness(3) = 0
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(3) = 0]
		endwith
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseOut = class::nativeObject_MouseOut
endwith
*/
// Notifies that the cursor exits the layer.
function nativeObject_MouseOut(Layer)
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(Layer)
		// var_Layer.Brightness(1) = oGauge.DefaultLayer(128)
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(1) = Me.DefaultLayer(128)]
		endwith
		// var_Layer.Brightness(2) = oGauge.DefaultLayer(128)
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(2) = Me.DefaultLayer(128)]
		endwith
		// var_Layer.Brightness(3) = oGauge.DefaultLayer(128)
		with (oGauge)
			TemplateDef = [dim var_Layer]
			TemplateDef = var_Layer
			Template = [var_Layer.Brightness(3) = Me.DefaultLayer(128)]
		endwith
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - B",.Value,Delta)
return

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.Template = [DefaultLayer(128) = 51] // oGauge.DefaultLayer(128) = 51
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 6
var_Layer = oGauge.Layers.Item(0)
	var_Layer.RotateCenterX = "lwidth/2-3"
	var_Layer.RotateCenterY = "lheight/2+23"
var_Layer1 = oGauge.Layers.Item(4)
	var_Layer1.DefaultRotateAngle = -132
	var_Layer1.OnDrag = 3
	var_Layer1.RotateAngleValid = "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
	var_Layer1.ValueToRotateAngle = "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
	var_Layer1.RotateAngleToValue = "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
oGauge.Value = 45
oGauge.EndUpdate()

35:
How can I imitate the rotating angle on an unequal scale

/*
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 = [Caption(0) = FormatABC("` Value: <b>` + (value format ``)",Layers.Item(4).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (value format ``)",oGauge.Layers.Item(4).Value)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - B",.Value,Delta)
return

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 6
var_Layer = oGauge.Layers.Item(0)
	var_Layer.RotateCenterX = "lwidth/2-3"
	var_Layer.RotateCenterY = "lheight/2+23"
var_Layer1 = oGauge.Layers.Item(4)
	var_Layer1.DefaultRotateAngle = -132
	var_Layer1.OnDrag = 3
	var_Layer1.RotateAngleValid = "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
	var_Layer1.ValueToRotateAngle = "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
	var_Layer1.RotateAngleToValue = "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
oGauge.Value = 45
oGauge.EndUpdate()

34:
How can I rotate more knobs at once

/*
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 = [Caption(0) = FormatABC("` Value: <b>` + (value format ``)",Layers.Item(4).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (value format ``)",oGauge.Layers.Item(4).Value)
	oGauge.Layers.Item(2).RotateAngle = oGauge.Layers.Item(4).RotateAngle
return

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

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`"
oGauge.Layers.Count = 5
var_Layer = oGauge.Layers.Item(4)
	var_Layer.OnDrag = 3
	var_Layer.DefaultRotateAngle = -142
var_Layer1 = oGauge.Layers.Item(2)
	var_Layer1.OnDrag = 2
	var_Layer1.RotateType = 2

33:
How can I clip one layer while other is rotating

/*
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 = [Caption(0) = FormatABC("` Value: <b>` + (value format ``)",Layers.Item(9).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (value format ``)",oGauge.Layers.Item(9).Value)
	oGauge.Template = [ExtraCaption("RotateAngle",0) = FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",Layers.Item(9).RotateAngle)] // oGauge.ExtraCaption("RotateAngle",0) = oGauge.FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",oGauge.Layers.Item(9).RotateAngle)
	oGauge.Template = [ExtraCaption("RotateAngle",5) = 18] // oGauge.ExtraCaption("RotateAngle",5) = 18
	oGauge.Template = [ExtraCaption("RotamoveCenter",0) = FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveCenterX,Layers.Item(9).RotamoveCenterY)] // oGauge.ExtraCaption("RotamoveCenter",0) = oGauge.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)
	oGauge.Template = [ExtraCaption("RotamoveCenter",5) = 36] // oGauge.ExtraCaption("RotamoveCenter",5) = 36
	oGauge.Template = [ExtraCaption("RotamoveOffset",0) = FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveOffsetX,Layers.Item(9).RotamoveOffsetY)] // oGauge.ExtraCaption("RotamoveOffset",0) = oGauge.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveOffsetX,oGauge.Layers.Item(9).RotamoveOffsetY)
	oGauge.Template = [ExtraCaption("RotamoveOffset",5) = 54] // oGauge.ExtraCaption("RotamoveOffset",5) = 54
	oGauge.Template = [ExtraCaption("Offset",0) = FormatABC("` Offset: <b> (` + A + `,` + B + `)`",Layers.Item(9).OffsetX,Layers.Item(9).OffsetY)] // oGauge.ExtraCaption("Offset",0) = oGauge.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).OffsetX,oGauge.Layers.Item(9).OffsetY)
	oGauge.Template = [ExtraCaption("Offset",5) = 72] // oGauge.ExtraCaption("Offset",5) = 72
	oGauge.Template = [ExtraCaption("Client",0) = FormatABC("`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",Me.Value)] // oGauge.ExtraCaption("Client",0) = oGauge.FormatABC("`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",oGauge.Value)
	oGauge.Template = [ExtraCaption("Client",4) = FormatABC("value - 12",Layers.Item(9).LayerToClientX(RotamoveCenterX,RotamoveCenterY))] // oGauge.ExtraCaption("Client",4) = oGauge.FormatABC("value - 12",.Item(9).LayerToClientX(oGauge.Layers.RotamoveCenterX,.RotamoveCenterY))
	oGauge.Template = [ExtraCaption("Client",5) = FormatABC("value - 36",Layers.Item(9).LayerToClientY(RotamoveCenterX,RotamoveCenterY))] // oGauge.ExtraCaption("Client",5) = oGauge.FormatABC("value - 36",.Item(9).LayerToClientY(oGauge.Layers.RotamoveCenterX,.RotamoveCenterY))
	oGauge.Layers.Item(3).Clip.Value = oGauge.Layers.Item(9).RotateAngle
	oGauge.Layers.Item(4).Clip.Value = oGauge.Layers.Item(3).Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )" */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("100 - value - B",oGauge.Value,Delta)
return

local oGauge,var_Layer

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"
oGauge.Layers.Item(3).Clip.Pie.SweepAngle = "value"
oGauge.Layers.Item(4).Clip.Pie.SweepAngle = oGauge.Layers.Item(3).Clip.Pie.SweepAngle
oGauge.Layers.Item(9).Value = 25
oGauge.EndUpdate()

32:
Can I move one or more layers at once

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Layers,var_Layers1
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	// oGauge.Layers.Item(3).Brightness(1) = oGauge.FormatABC("100 - value ",oGauge.Value)
	var_Layers = oGauge.Layers.Item(3)
	with (oGauge)
		TemplateDef = [dim var_Layers]
		TemplateDef = var_Layers
		Template = [var_Layers.Brightness(1) = Me.FormatABC("100 - value ",Me.Value)]
	endwith
	// oGauge.Layers.Item(4).Brightness(1) = oGauge.Layers.Item(3).Brightness(1)
	var_Layers1 = oGauge.Layers.Item(4)
	with (oGauge)
		TemplateDef = [dim var_Layers1]
		TemplateDef = var_Layers1
		Template = [var_Layers1.Brightness(1) = Me.Layers.Item(3).Brightness(1)]
	endwith
	oGauge.Template = [Caption(0) = FormatABC("` Value: <b>` + (100 - value format ``)",Layers.Item(9).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (100 - value format ``)",oGauge.Layers.Item(9).Value)
	oGauge.Template = [ExtraCaption("RotateAngle",0) = FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",Layers.Item(9).RotateAngle)] // oGauge.ExtraCaption("RotateAngle",0) = oGauge.FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",oGauge.Layers.Item(9).RotateAngle)
	oGauge.Template = [ExtraCaption("RotateAngle",5) = 18] // oGauge.ExtraCaption("RotateAngle",5) = 18
	oGauge.Template = [ExtraCaption("RotamoveCenter",0) = FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveCenterX,Layers.Item(9).RotamoveCenterY)] // oGauge.ExtraCaption("RotamoveCenter",0) = oGauge.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)
	oGauge.Template = [ExtraCaption("RotamoveCenter",5) = 36] // oGauge.ExtraCaption("RotamoveCenter",5) = 36
	oGauge.Template = [ExtraCaption("RotamoveOffset",0) = FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveOffsetX,Layers.Item(9).RotamoveOffsetY)] // oGauge.ExtraCaption("RotamoveOffset",0) = oGauge.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveOffsetX,oGauge.Layers.Item(9).RotamoveOffsetY)
	oGauge.Template = [ExtraCaption("RotamoveOffset",5) = 54] // oGauge.ExtraCaption("RotamoveOffset",5) = 54
	oGauge.Template = [ExtraCaption("Offset",0) = FormatABC("` Offset: <b> (` + A + `,` + B + `)`",Layers.Item(9).OffsetX,Layers.Item(9).OffsetY)] // oGauge.ExtraCaption("Offset",0) = oGauge.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).OffsetX,oGauge.Layers.Item(9).OffsetY)
	oGauge.Template = [ExtraCaption("Offset",5) = 72] // oGauge.ExtraCaption("Offset",5) = 72
	oGauge.Layers.Item(10).RotateAngle = oGauge.Layers.Item(9).RotateAngle
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DblClick = class::nativeObject_DblClick
endwith
*/
// Occurs when the user dblclk the left mouse button over an object.
function nativeObject_DblClick(Shift,X,Y)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = 0
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise ) */
	/* ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `` ", DragInfo.CumulativeRotateAngle ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	? Str(DragInfo) 
	oGauge.Template = [ExtraCaption("Clockwise",5) = 90] // oGauge.ExtraCaption("Clockwise",5) = 90
	oGauge.Template = [ExtraCaption("Cumulative",5) = 108] // oGauge.ExtraCaption("Cumulative",5) = 108
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragEnd = class::nativeObject_DragEnd
endwith
*/
// Occurs once the user ends dragging a layer.
function nativeObject_DragEnd(DragInfo,Cancel)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Template = [ExtraCaption("Clockwise",0) = ""] // oGauge.ExtraCaption("Clockwise",0) = ""
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug  = 227 */
	/* DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Template = [ExtraCaption("Clockwise",0) = ""] // oGauge.ExtraCaption("Clockwise",0) = ""
	oGauge.Template = [ExtraCaption("Cumulative",0) = ""] // oGauge.ExtraCaption("Cumulative",0) = ""
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("100 - A - B",oGauge.Value,Delta)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Layer3

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.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 11
oGauge.AllowSmoothChange = 0
var_Layer = oGauge.Layers.Item(9)
	var_Layer.OnDrag = 3
	var_Layer.DefaultRotateAngle = -126
	var_Layer.RotateAngleToValue = "100 - (value ) / 360 * 100"
	var_Layer.ValueToRotateAngle = "(value)/100 * 360"
var_Layer1 = oGauge.Layers.Item(10)
	var_Layer1.Grayscale = true
	var_Layer1.Transparency = 25
	var_Layer1.DefaultRotateAngle = -69.5
	var_Layer1.RotateAngleToValue = "100 - (value ) / 360 * 100"
	var_Layer1.ValueToRotateAngle = "(value 1)/100 * 360"
	var_Layer1.Background.Picture.Value = "Highlighted_Layer4.png"
var_Layer2 = oGauge.Layers.Item(3)
	// var_Layer2.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer2]
		TemplateDef = var_Layer2
		Template = [var_Layer2.Brightness(0) = 0]
	endwith
	// var_Layer2.Brightness(1) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer2]
		TemplateDef = var_Layer2
		Template = [var_Layer2.Brightness(1) = 0]
	endwith
var_Layer3 = oGauge.Layers.Item(4)
	// var_Layer3.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer3]
		TemplateDef = var_Layer3
		Template = [var_Layer3.Brightness(0) = 0]
	endwith
	// var_Layer3.Brightness(1) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer3]
		TemplateDef = var_Layer3
		Template = [var_Layer3.Brightness(1) = 0]
	endwith
oGauge.LayerOfValue = 9
oGauge.Value = 5
oGauge.EndUpdate()

31:
How can I rotate a knob by moving ( rotamove )

/*
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.Layers.Item(3).Transparency = oGauge.Value
	oGauge.Layers.Item(4).Transparency = oGauge.Value
	oGauge.Template = [Caption(0) = FormatABC("` Value: <b>` + (100 - value format ``)",Layers.Item(9).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (100 - value format ``)",oGauge.Layers.Item(9).Value)
	oGauge.Template = [ExtraCaption("RotateAngle",0) = FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",Layers.Item(9).RotateAngle)] // oGauge.ExtraCaption("RotateAngle",0) = oGauge.FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",oGauge.Layers.Item(9).RotateAngle)
	oGauge.Template = [ExtraCaption("RotateAngle",5) = 18] // oGauge.ExtraCaption("RotateAngle",5) = 18
	oGauge.Template = [ExtraCaption("RotamoveCenter",0) = FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveCenterX,Layers.Item(9).RotamoveCenterY)] // oGauge.ExtraCaption("RotamoveCenter",0) = oGauge.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)
	oGauge.Template = [ExtraCaption("RotamoveCenter",5) = 36] // oGauge.ExtraCaption("RotamoveCenter",5) = 36
	oGauge.Template = [ExtraCaption("RotamoveOffset",0) = FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveOffsetX,Layers.Item(9).RotamoveOffsetY)] // oGauge.ExtraCaption("RotamoveOffset",0) = oGauge.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveOffsetX,oGauge.Layers.Item(9).RotamoveOffsetY)
	oGauge.Template = [ExtraCaption("RotamoveOffset",5) = 54] // oGauge.ExtraCaption("RotamoveOffset",5) = 54
	oGauge.Template = [ExtraCaption("Offset",0) = FormatABC("` Offset: <b> (` + A + `,` + B + `)`",Layers.Item(9).OffsetX,Layers.Item(9).OffsetY)] // oGauge.ExtraCaption("Offset",0) = oGauge.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).OffsetX,oGauge.Layers.Item(9).OffsetY)
	oGauge.Template = [ExtraCaption("Offset",5) = 72] // oGauge.ExtraCaption("Offset",5) = 72
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DblClick = class::nativeObject_DblClick
endwith
*/
// Occurs when the user dblclk the left mouse button over an object.
function nativeObject_DblClick(Shift,X,Y)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = 0
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("100 - A - B",oGauge.Value,Delta)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Picture

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.OnDrag = 3
	var_Layer.DefaultRotateAngle = -126
	var_Layer.RotateAngleToValue = "100 - value / 360 * 100"
	var_Layer.ValueToRotateAngle = "(value)/100 * 360"
	// var_Layer.Background.ExtraPicture("Aka").Value = "Highlighted_Layer4.png"
	var_Picture = var_Layer.Background.ExtraPicture("Aka")
	with (oGauge)
		TemplateDef = [dim var_Picture]
		TemplateDef = var_Picture
		Template = [var_Picture.Value = "Highlighted_Layer4.png"]
	endwith
var_Layer1 = oGauge.Layers.Item(3)
	// var_Layer1.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(0) = 0]
	endwith
	// var_Layer1.Brightness(1) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(1) = 100]
	endwith
var_Layer2 = oGauge.Layers.Item(4)
	var_Layer2.OnDrag = 3
	// var_Layer2.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer2]
		TemplateDef = var_Layer2
		Template = [var_Layer2.Brightness(0) = 0]
	endwith
	// var_Layer2.Brightness(1) = 100
	with (oGauge)
		TemplateDef = [dim var_Layer2]
		TemplateDef = var_Layer2
		Template = [var_Layer2.Brightness(1) = 100]
	endwith
oGauge.Value = 15
oGauge.EndUpdate()

30:
How can I display a knob, and displays the current value on it

/*
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 = [Caption(0) = FormatABC("` Value: <b>` + (100 - value format ``)",Layers.Item(9).Value)] // oGauge.Caption(0) = oGauge.FormatABC("` Value: <b>` + (100 - value format ``)",oGauge.Layers.Item(9).Value)
	oGauge.Template = [ExtraCaption("RotateAngle",0) = FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",Layers.Item(9).RotateAngle)] // oGauge.ExtraCaption("RotateAngle",0) = oGauge.FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",oGauge.Layers.Item(9).RotateAngle)
	oGauge.Template = [ExtraCaption("RotateAngle",5) = 18] // oGauge.ExtraCaption("RotateAngle",5) = 18
	oGauge.Template = [ExtraCaption("RotamoveCenter",0) = FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveCenterX,Layers.Item(9).RotamoveCenterY)] // oGauge.ExtraCaption("RotamoveCenter",0) = oGauge.FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveCenterX,oGauge.Layers.Item(9).RotamoveCenterY)
	oGauge.Template = [ExtraCaption("RotamoveCenter",5) = 36] // oGauge.ExtraCaption("RotamoveCenter",5) = 36
	oGauge.Template = [ExtraCaption("RotamoveOffset",0) = FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",Layers.Item(9).RotamoveOffsetX,Layers.Item(9).RotamoveOffsetY)] // oGauge.ExtraCaption("RotamoveOffset",0) = oGauge.FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).RotamoveOffsetX,oGauge.Layers.Item(9).RotamoveOffsetY)
	oGauge.Template = [ExtraCaption("RotamoveOffset",5) = 54] // oGauge.ExtraCaption("RotamoveOffset",5) = 54
	oGauge.Template = [ExtraCaption("Offset",0) = FormatABC("` Offset: <b> (` + A + `,` + B + `)`",Layers.Item(9).OffsetX,Layers.Item(9).OffsetY)] // oGauge.ExtraCaption("Offset",0) = oGauge.FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oGauge.Layers.Item(9).OffsetX,oGauge.Layers.Item(9).OffsetY)
	oGauge.Template = [ExtraCaption("Offset",5) = 72] // oGauge.ExtraCaption("Offset",5) = 72
	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))
	oGauge.Layers.Item(7).RotateAngle = oGauge.Layers.Item(0).RotateAngle
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("100 - A - B",oGauge.Value,Delta)
return

local oGauge,var_Layer,var_Layer1,var_Layer2

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"
oGauge.Layers.Item(3).Visible = false
oGauge.Layers.Item(4).Visible = false
var_Layer1 = oGauge.Layers.Item(0)
	var_Layer1.OnDrag = 2
	var_Layer1.RotateType = 2
var_Layer2 = oGauge.Layers.Item(7)
	var_Layer2.OnDrag = 2
	var_Layer2.RotateType = 2
oGauge.Value = 25
oGauge.EndUpdate()

29:
How can I display an indicator

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(1).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",.Layers.Item(1).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipRectangle,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator"
oGauge.Layers.Count = 3
oGauge.Layers.Item(0).Background.Picture.Name = "Background.png"
var_Layer = oGauge.Layers.Item(1)
	var_Layer.Background.Picture.Name = "Green_Lights.png"
	var_Clip = var_Layer.Clip
		var_ClipRectangle = var_Clip.Rectangle
			var_ClipRectangle.Height = "(100 - value)/100 * height"
			var_ClipRectangle.InverseClip = true
		var_Clip.Value = 50
var_Layer1 = oGauge.Layers.Item(2)
	var_Layer1.Visible = false
	var_Layer1.Background.Picture.Name = "overlay_top_layer.png"

28:
How can I display a gauge

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the layer's value is changed.
function nativeObject_Change(Layer)
	local var_Layers
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	// oGauge.Layers.Item(1).Brightness(2) = oGauge.Value
	var_Layers = oGauge.Layers.Item(1)
	with (oGauge)
		TemplateDef = [dim var_Layers]
		TemplateDef = var_Layers
		Template = [var_Layers.Brightness(2) = Me.Value]
	endwith
return

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

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - B",oGauge.Value,Delta)
return

local oGauge,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.BackColor = 0xd9d9d9
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
oGauge.Layers.Count = 2
oGauge.AllowSmoothChange = 0
var_Layer = oGauge.Layers.Item(0)
	var_Layer.RotateCenterY = "lheight/2 + 78"
	var_Layer.Background.Picture.Name = "Guage_Background.png"
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.OnDrag = 2
	var_Layer1.Background.Picture.Name = "Guage_Needle.png"
	var_Layer1.RotateAngleValid = "value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))"
	var_Layer1.RotateAngleToValue = "value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50"
	var_Layer1.ValueToRotateAngle = "value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90"
	var_Layer1.RotateType = 2
	// var_Layer1.Brightness(0) = 0
	with (oGauge)
		TemplateDef = [dim var_Layer1]
		TemplateDef = var_Layer1
		Template = [var_Layer1.Brightness(0) = 0]
	endwith
oGauge.Value = 78
oGauge.EndUpdate()

27:
How can I display a clock (rotate,wolf)

/*
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.Layers.Item("sec").Value = oGauge.Value
	oGauge.Layers.Item("min").Value = oGauge.Value
	oGauge.Layers.Item("hour").Value = oGauge.Value
	oGauge.Layers.Item("range").Clip.Value = oGauge.Layers.Item("pointer").Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug = -1 */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item("pointer").Value = oGauge.FormatABC("A - B",oGauge.Layers.Item("pointer").Value,Delta)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Timer = class::nativeObject_Timer
endwith
*/
// Occurs when the interval elapses.
function nativeObject_Timer(TickCount)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC(" date(`now`)")
	oGauge.Layers.Item("pointer").Value = oGauge.FormatABC("sin((value/100 mod 100)/100 * 2 * asin(1)) * 100",TickCount)
	oGauge.Layers.Item("range").Clip.Value = oGauge.Layers.Item("pointer").Value
return

local oGauge,var_ClipPie,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8,var_Picture,var_Picture1,var_Picture2

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 9
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Layer.Background.Picture.Name = "Back.png"
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Key = "scale"
	var_Layer1.DefaultOffsetX = -90
	var_Layer1.DefaultOffsetY = -150
	var_Layer1.Background.Picture.Name = "Scale.png"
	var_Layer1.RotateCenterLayer = 1
	var_Layer1.RotateCenterX = "(lwidth+181)/2"
	var_Layer1.RotateCenterY = "(lheight+232)/2"
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.Key = "range"
	var_Layer2.DefaultOffsetX = oGauge.Layers.Item("scale").DefaultOffsetX
	var_Layer2.DefaultOffsetY = oGauge.Layers.Item("scale").DefaultOffsetY
	var_Layer2.RotateCenterLayer = oGauge.Layers.Item("scale").Index
	var_Picture = var_Layer2.Background.Picture
		var_Picture.Name = "ScalePointerArc.png"
	var_Layer2.RotateCenterLayer = oGauge.Layers.Item("scale").Index
	var_ClipPie = var_Layer2.Clip.Pie
		var_ClipPie.RadiusX = Str(100)
		var_ClipPie.RadiusY = Str(100)
		var_ClipPie.CenterX = oGauge.Layers.Item("scale").RotateCenterX
		var_ClipPie.CenterY = oGauge.Layers.Item("scale").RotateCenterY
		var_ClipPie.StartAngle = Str(-148)
		var_ClipPie.SweepAngle = "value/100 * 300"
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Key = "pointer"
	var_Layer3.DefaultOffsetX = oGauge.Layers.Item("scale").DefaultOffsetX
	var_Layer3.DefaultOffsetY = oGauge.Layers.Item("scale").DefaultOffsetY
	var_Picture1 = var_Layer3.Background.Picture
		var_Picture1.Name = "ScalePointer.png"
	var_Layer3.RotateCenterLayer = oGauge.Layers.Item("scale").Index
	var_Layer3.OnDrag = 2
	var_Layer3.DefaultRotateAngle = -148
	var_Layer3.RotateAngleValid = "value > 300 ? (value > 330 ? 0 : 300) : value"
	var_Layer3.RotateAngleToValue = "value / 300 * 100"
	var_Layer3.ValueToRotateAngle = "value /100 * 300"
var_Layer4 = oGauge.Layers.Item(4)
	var_Layer4.Key = "bolt"
	var_Layer4.DefaultOffsetX = oGauge.Layers.Item("scale").DefaultOffsetX
	var_Layer4.DefaultOffsetY = oGauge.Layers.Item("scale").DefaultOffsetY
	var_Picture2 = var_Layer4.Background.Picture
		var_Picture2.Name = "Bolt.png"
var_Layer5 = oGauge.Layers.Item(5)
	var_Layer5.Left = "(width-512)/2"
	var_Layer5.Top = "(height-512)/2"
	var_Layer5.Height = Str(512)
	var_Layer5.Width = Str(512)
	var_Layer5.Key = "sec"
	var_Layer5.OnDrag = 2
	var_Layer5.Selectable = false
	var_Layer5.Background.Picture.Name = "second-hand.png"
	var_Layer5.ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	var_Layer5.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer6 = oGauge.Layers.Item(6)
	var_Layer6.Left = "(width-512)/2"
	var_Layer6.Top = "(height-512)/2"
	var_Layer6.Height = Str(512)
	var_Layer6.Width = Str(512)
	var_Layer6.Key = "min"
	var_Layer6.OnDrag = 2
	var_Layer6.Selectable = false
	var_Layer6.Background.Picture.Name = "Minute.png"
	var_Layer6.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	var_Layer6.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer7 = oGauge.Layers.Item(7)
	var_Layer7.Left = "(width-512)/2"
	var_Layer7.Top = "(height-512)/2"
	var_Layer7.Height = Str(512)
	var_Layer7.Width = Str(512)
	var_Layer7.Key = "hour"
	var_Layer7.OnDrag = 2
	var_Layer7.Background.Picture.Name = "Hour.png"
	var_Layer7.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer7.RotateAngleToValue = "value / 360 * 0.5"
var_Layer8 = oGauge.Layers.Item(8)
	var_Layer8.Left = "(width-512)/2"
	var_Layer8.Top = "(height-512)/2"
	var_Layer8.Height = Str(512)
	var_Layer8.Width = Str(512)
	var_Layer8.Key = "front"
	var_Layer8.OnDrag = 2
	var_Layer8.Background.Picture.Name = "front.png"
oGauge.LayerOfValue = oGauge.Layers.Item("hour").Index
oGauge.Value = oGauge.FormatABC("date(`now`)")
oGauge.TimerInterval = 100

26:
How can I display a clock (rotate,vintage)

/*
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.Layers.Item("sec").Value = oGauge.Value
	oGauge.Layers.Item("min").Value = oGauge.Value
	oGauge.Layers.Item("hour").Value = oGauge.Value
return

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

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - 1/24/60/60*B",oGauge.Value,Delta)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Timer = class::nativeObject_Timer
endwith
*/
// Occurs when the interval elapses.
function nativeObject_Timer(TickCount)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value + 1/24/60/60",oGauge.Value)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 5
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Layer.Background.Picture.Name = "Back.png"
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Position = 3
	var_Layer1.Left = "(width-512)/2"
	var_Layer1.Top = "(height-512)/2"
	var_Layer1.Height = Str(512)
	var_Layer1.Width = Str(512)
	var_Layer1.Key = "sec"
	var_Layer1.OnDrag = 2
	var_Layer1.Selectable = false
	var_Layer1.Background.Picture.Name = "second-hand.png"
	var_Layer1.ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	var_Layer1.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.Left = "(width-512)/2"
	var_Layer2.Top = "(height-512)/2"
	var_Layer2.Height = Str(512)
	var_Layer2.Width = Str(512)
	var_Layer2.Position = 2
	var_Layer2.Key = "min"
	var_Layer2.OnDrag = 2
	var_Layer2.Selectable = false
	var_Layer2.Background.Picture.Name = "Minute.png"
	var_Layer2.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	var_Layer2.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Left = "(width-512)/2"
	var_Layer3.Top = "(height-512)/2"
	var_Layer3.Height = Str(512)
	var_Layer3.Width = Str(512)
	var_Layer3.Position = 1
	var_Layer3.Key = "hour"
	var_Layer3.OnDrag = 2
	var_Layer3.Background.Picture.Name = "Hour.png"
	var_Layer3.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer3.RotateAngleToValue = "value / 360 * 0.5"
var_Layer4 = oGauge.Layers.Item(4)
	var_Layer4.Left = "(width-512)/2"
	var_Layer4.Top = "(height-512)/2"
	var_Layer4.Height = Str(512)
	var_Layer4.Width = Str(512)
	var_Layer4.Position = 1
	var_Layer4.Key = "front"
	var_Layer4.OnDrag = 2
	var_Layer4.Background.Picture.Name = "front.png"
	var_Layer4.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer4.RotateAngleToValue = "value / 360 * 0.5"
oGauge.LayerOfValue = 3
oGauge.Value = oGauge.FormatABC("date(`now`)")
oGauge.TimerInterval = 1000

25:
How can I display a clock (rotate,london)

/*
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.Layers.Item("sec").Value = oGauge.Value
	oGauge.Layers.Item("min").Value = oGauge.Value
	oGauge.Layers.Item("hour").Value = oGauge.Value
return

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

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - 1/24/60/60*B",oGauge.Value,Delta)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Timer = class::nativeObject_Timer
endwith
*/
// Occurs when the interval elapses.
function nativeObject_Timer(TickCount)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value + 1/24/60/60",.Value)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 6
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Layer.Background.Picture.Name = "Back.png"
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Position = 3
	var_Layer1.Left = "(width-512)/2"
	var_Layer1.Top = "(height-512)/2"
	var_Layer1.Height = Str(512)
	var_Layer1.Width = Str(512)
	var_Layer1.Key = "sec"
	var_Layer1.OnDrag = 2
	var_Layer1.Selectable = false
	var_Layer1.RotateCenterLayer = 1
	var_Layer1.Background.Picture.Name = "second-hand.png"
	var_Layer1.ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	var_Layer1.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.Left = "(width-512)/2"
	var_Layer2.Top = "(height-512)/2"
	var_Layer2.Height = Str(512)
	var_Layer2.Width = Str(512)
	var_Layer2.Position = 2
	var_Layer2.RotateCenterLayer = 2
	var_Layer2.Key = "min"
	var_Layer2.OnDrag = 2
	var_Layer2.Selectable = false
	var_Layer2.Background.Picture.Name = "Minute.png"
	var_Layer2.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	var_Layer2.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Left = "(width-512)/2"
	var_Layer3.Top = "(height-512)/2"
	var_Layer3.Height = Str(512)
	var_Layer3.Width = Str(512)
	var_Layer3.Position = 1
	var_Layer3.Key = "hour"
	var_Layer3.RotateCenterLayer = 3
	var_Layer3.OnDrag = 2
	var_Layer3.Background.Picture.Name = "Hour.png"
	var_Layer3.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer3.RotateAngleToValue = "value / 360 * 0.5"
var_Layer4 = oGauge.Layers.Item(4)
	var_Layer4.Left = "(width-512)/2"
	var_Layer4.Top = "(height-512)/2"
	var_Layer4.Height = Str(512)
	var_Layer4.Width = Str(512)
	var_Layer4.Position = 1
	var_Layer4.Key = "front"
	var_Layer4.RotateCenterLayer = 4
	var_Layer4.OnDrag = 2
	var_Layer4.Background.Picture.Name = "front.png"
	var_Layer4.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer4.RotateAngleToValue = "value / 360 * 0.5"
var_Layer5 = oGauge.Layers.Item(5)
	var_Layer5.Left = "(width-512)/2"
	var_Layer5.Top = "(height-512)/2"
	var_Layer5.Height = Str(512)
	var_Layer5.Width = Str(512)
	var_Layer5.Key = "bolt"
	var_Layer5.RotateCenterLayer = 5
	var_Layer5.Background.Picture.Name = "Bolt.png"
oGauge.LayerOfValue = oGauge.Layers.Item("hour").Index
oGauge.Value = oGauge.FormatABC("date(`now`)")
oGauge.TimerInterval = 1000

24:
How can I display a clock (rotate)

/*
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.Layers.Item("sec").Value = oGauge.Value
	oGauge.Layers.Item("min").Value = oGauge.Value
	oGauge.Layers.Item("hour").Value = oGauge.Value
return

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

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("A - 1/24/60/60*B",oGauge.Value,Delta)
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Timer = class::nativeObject_Timer
endwith
*/
// Occurs when the interval elapses.
function nativeObject_Timer(TickCount)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Value = oGauge.FormatABC("value + 1/24/60/60",oGauge.Value)
return

local oGauge,var_Layer,var_Layer1,var_Layer2,var_Layer3

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock"
oGauge.Template = [DefaultLayer(185) = 2] // oGauge.DefaultLayer(185) = 2
oGauge.Layers.Count = 4
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Name = "vista_clock.png"
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Position = 3
	var_Layer1.Key = "sec"
	var_Layer1.OnDrag = 2
	var_Layer1.Selectable = false
	var_Layer1.Background.Picture.Name = "second-hand.png"
	var_Layer1.ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	var_Layer1.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer2 = oGauge.Layers.Item(2)
	var_Layer2.Position = 2
	var_Layer2.Key = "min"
	var_Layer2.OnDrag = 2
	var_Layer2.Selectable = false
	var_Layer2.Background.Picture.Name = "Minute.png"
	var_Layer2.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	var_Layer2.RotateAngleToValue = "value / 360 / 24 / 60"
var_Layer3 = oGauge.Layers.Item(3)
	var_Layer3.Position = 1
	var_Layer3.Key = "hour"
	var_Layer3.OnDrag = 2
	var_Layer3.Background.Picture.Name = "Hour.png"
	var_Layer3.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	var_Layer3.RotateAngleToValue = "value / 360 * 0.5"
oGauge.LayerOfValue = 3
oGauge.Value = oGauge.FormatABC("date(`now`)")
oGauge.TimerInterval = 1000

23:
How can I clip as a triangle

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipPolygon,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Clip = var_Layer.Clip
		var_ClipPolygon = var_Clip.Polygon
			var_ClipPolygon.Points = 3
			// var_ClipPolygon.X(0) = Str(0)
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.X(0) = 0]
			endwith
			// var_ClipPolygon.Y(0) = "height"
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.Y(0) = "height"]
			endwith
			// var_ClipPolygon.X(1) = "width/2"
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.X(1) = "width/2"]
			endwith
			// var_ClipPolygon.Y(1) = "value/100*width"
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.Y(1) = "value/100*width"]
			endwith
			// var_ClipPolygon.X(2) = "width"
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.X(2) = "width"]
			endwith
			// var_ClipPolygon.Y(2) = "height"
			with (oGauge)
				TemplateDef = [dim var_ClipPolygon]
				TemplateDef = var_ClipPolygon
				Template = [var_ClipPolygon.Y(2) = "height"]
			endwith
			var_ClipPolygon.InverseClip = true
		var_Clip.Value = 50

22:
How can I limit the rotation from 0 to 360 degree, while dragging
/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug = 483 */
	/* DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.RotateType = 2
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngle = -45

21:
How can I clip as a pie

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug = -1 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipPie,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-128)/2"
	var_Layer.Top = "(height-128)/2"
	var_Layer.Height = Str(128)
	var_Layer.Width = Str(128)
	var_Layer.Background.Color.Value = 0xff00
	var_Clip = var_Layer.Clip
		var_ClipPie = var_Clip.Pie
			var_ClipPie.InverseClip = true
			var_ClipPie.StartAngle = Str(0)
			var_ClipPie.SweepAngle = "value/100*360"
		var_Clip.Value = 15

20:
How can I use a picture to clip the layer

/*
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.Layers.Item("Clip").Clip.Value = oGauge.Layers.Item("Thumb").RotateAngle
return

local oGauge,var_Clip,var_ClipPicture,var_Layer,var_Layer1

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.BeginUpdate()
oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 5
var_Layer = oGauge.Layers.Item(4)
	var_Layer.Key = "Thumb"
	var_Layer.DefaultRotateAngle = -141
	var_Layer.OnDrag = 2
	var_Layer.RotateType = 2
var_Layer1 = oGauge.Layers.Item(1)
	var_Layer1.Key = "Clip"
	var_Clip = var_Layer1.Clip
		var_Clip.Pie.SweepAngle = "value"
		var_ClipPicture = var_Clip.Picture
			var_ClipPicture.Name = oGauge.Layers.Item("Clip").Background.Picture.Name
			var_ClipPicture.AlphaTo = "128"
oGauge.Layers.Item("Thumb").RotateAngle = 90
oGauge.EndUpdate()

19:
How do I clip a circle/ellipse

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-128)/2"
	var_Layer.Top = "(height-128)/2"
	var_Layer.Height = Str(128)
	var_Layer.Width = Str(128)
	var_Layer.Background.Color.Value = 0xff00
	var_Clip = var_Layer.Clip
		var_Clip.Ellipse.RadiusX = "value/100 * width"
		var_Clip.Value = 25

18:
What InverseClip does

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipRoundRectangle,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-128)/2"
	var_Layer.Top = "(height-128)/2"
	var_Layer.Height = Str(128)
	var_Layer.Width = Str(128)
	var_Layer.Background.Color.Value = 0xff00
	var_Clip = var_Layer.Clip
		var_ClipRoundRectangle = var_Clip.RoundRectangle
			var_ClipRoundRectangle.Width = "value/100 * width"
			var_ClipRoundRectangle.RoundRadiusX = "width/8"
			var_ClipRoundRectangle.RoundRadiusY = "height/8"
			var_ClipRoundRectangle.InverseClip = true
		var_Clip.Value = 50

17:
How do I clip as rectangle (round), from left to right

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipRoundRectangle,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Left = "(width-128)/2"
	var_Layer.Top = "(height-128)/2"
	var_Layer.Height = Str(128)
	var_Layer.Width = Str(128)
	var_Layer.Background.Color.Value = 0xff00
	var_Clip = var_Layer.Clip
		var_ClipRoundRectangle = var_Clip.RoundRectangle
			var_ClipRoundRectangle.Width = "value/100 * width"
			var_ClipRoundRectangle.RoundRadiusX = "width/8"
			var_ClipRoundRectangle.RoundRadiusY = "height/8"
		var_Clip.Value = 50

16:
How do I clip as rectangle, from bottom to top

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipRectangle,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Clip = var_Layer.Clip
		var_ClipRectangle = var_Clip.Rectangle
			var_ClipRectangle.Height = "value/100 * height"
			var_ClipRectangle.InverseClip = true
		var_Clip.Value = 50

15:
How do I clip as rectangle, from top to bottom

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Clip = var_Layer.Clip
		var_Clip.Rectangle.Height = "value/100 * height"
		var_Clip.Value = 50

14:
How do I clip as rectangle, from right to left

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_ClipRectangle,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Clip = var_Layer.Clip
		var_ClipRectangle = var_Clip.Rectangle
			var_ClipRectangle.Width = "value/100 * width"
			var_ClipRectangle.InverseClip = true
		var_Clip.Value = 50

13:
How do I clip as rectangle, from left to right

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	Drag = class::nativeObject_Drag
endwith
*/
// Notifies that the user drags the layer.
function nativeObject_Drag(DragInfo)
	/* Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) */
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	DragStart = class::nativeObject_DragStart
endwith
*/
// Occurs once the user starts dragging a layer.
function nativeObject_DragStart(DragInfo,Cancel)
	/* DragInfo.Debug= 287 */
	local var_Layer
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	var_Layer = oGauge.Layers.Item(0)
		var_Layer.UserData = var_Layer.Clip.Value
return

/*
with (this.EXGAUGEACTIVEXCONTROL1.nativeObject)
	MouseWheel = class::nativeObject_MouseWheel
endwith
*/
// Occurs when the mouse wheel moves while the control has focus
function nativeObject_MouseWheel(Delta)
	oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
	oGauge.Layers.Item(0).Clip.Value = oGauge.FormatABC("(value + B) MIN 0 MAX 100",oGauge.Layers.Item(0).Clip.Value,Delta)
return

local oGauge,var_Clip,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Clip = var_Layer.Clip
		var_Clip.Rectangle.Width = "value/100 * width"
		var_Clip.Value = 50

12:
How can I associate a value to rotation angle

/*
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 = [Caption(0) = FormatABC("`Value: <b>` + (value format ``) ",Layers.Item(0).Value)] // oGauge.Caption(0) = oGauge.FormatABC("`Value: <b>` + (value format ``) ",oGauge.Layers.Item(0).Value)
return

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.RotateType = 2
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.DefaultRotateAngle = 45
	var_Layer.RotateCenterY = "lheight/2 + 32"
	var_Layer.RotateCenterX = "lwidth/2 + 32"
	var_Layer.RotateAngleToValue = "value/360 * 100"
	var_Layer.ValueToRotateAngle = "value / 100 * 360"
	var_Layer.Value = 50

11:
How can I associate a value to vertical offset

/*
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 = [Caption(0) = FormatABC("`Value: <b>` + (value format ``)",Layers.Item(0).Value)] // oGauge.Caption(0) = oGauge.FormatABC("`Value: <b>` + (value format ``)",oGauge.Layers.Item(0).Value)
return

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

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1
	var_Layer.DefaultOffsetY = -100
	var_Layer.OffsetYValid = "value MIN 0 MAX 200"
	var_Layer.OffsetXValid = Str(0)
	var_Layer.OffsetToValue = "offsety /200 * 100"
	var_Layer.ValueToOffsetY = "value / 100 * 200"
	var_Layer.Value = 50

10:
How can I associate a value to horizontal offset

/*
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 = [Caption(0) = FormatABC("`Value: <b>` + (value format ``)",Layers.Item(0).Value)] // oGauge.Caption(0) = oGauge.FormatABC("`Value: <b>` + (value format ``)",oGauge.Layers.Item(0).Value)
return

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

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1
	var_Layer.DefaultOffsetX = -100
	var_Layer.OffsetXValid = "value MIN 0 MAX 200"
	var_Layer.OffsetYValid = Str(0)
	var_Layer.OffsetToValue = "offsetx /200 * 100"
	var_Layer.ValueToOffsetX = "value / 100 * 200"
	var_Layer.Value = 50

9:
How can I display the current angle

/*
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 = [Caption(0) = FormatABC("`Angle: <b>` + (value format ``) + ``",Layers.Item(0).RotateAngle)] // oGauge.Caption(0) = oGauge.FormatABC("`Angle: <b>` + (value format ``) + ``",oGauge.Layers.Item(0).RotateAngle)
return

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.RotateType = 2
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngleValid = "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"

8:
How can I limit the rotation angle

/*
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 = [Caption(0) = FormatABC("`Angle: <b>` + (value format ``) + ``",Layers.Item(0).RotateAngle)] // oGauge.Caption(0) = oGauge.FormatABC("`Angle: <b>` + (value format ``) + ``",oGauge.Layers.Item(0).RotateAngle)
return

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.RotateType = 2
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngleValid = "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"

7:
Can I specify a different center while rotating

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.RotateType = 2
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngle = -45
	var_Layer.RotateCenterY = "lheight/2 + 32"
	var_Layer.RotateCenterX = "lwidth/2 + 32"

6:
How can I rotate a layer, without cutting off the picture

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Left = "(width-512)/2"
	var_Layer.Top = "(height-512)/2"
	var_Layer.Height = Str(512)
	var_Layer.Width = Str(512)
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Left = "(width-pwidth)/2"
		var_Picture.Top = "(height-pheight)/2"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngle = -45

5:
How can I rotate a layer

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

local oGauge,var_Layer,var_Picture

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Picture = var_Layer.Background.Picture
		var_Picture.Value = "c:\exontrol\images\card.png"
		var_Picture.Width = "pwidth"
		var_Picture.Height = "pheight"
	var_Layer.OnDrag = 2
	var_Layer.RotateAngle = 45

4:
Is there any way to debug the layer while moving

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

local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1

3:
How do I specify where to move the layer, while dragging
local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1
	var_Layer.OffsetXValid = "int(value / 64) * 64"
	var_Layer.OffsetYValid = "int(value / 64) * 64"

2:
How can I add layers to the control
local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
var_Layer = oGauge.Layers.Add("back")
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1

1:
How can I add layers to the control
local oGauge,var_Layer

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.Layers.Count = 1
var_Layer = oGauge.Layers.Item(0)
	var_Layer.Background.Picture.Value = "c:\exontrol\images\card.png"
	var_Layer.OnDrag = 1