58:
Tic Tac Toe Game

// Occurs when the user presses and then releases the left mouse button over the control.
Procedure OnComClick 
	Forward Send OnComClick 
	// Left = Me.Layers(l).Left
	// Top = Me.Layers(l).Top
	// Width = Me.Layers(l).Width
	// Height = Me.Layers(l).Height
	Variant l
	Get ComLayerFromPoint -1 -1 to l
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
	Variant vKey
			Variant voLayers1
			Get ComLayers to voLayers1
			Handle hoLayers1
			Get Create (RefClass(cComLayers)) to hoLayers1
			Set pvComObject of hoLayers1 to voLayers1
				Get ComCount of hoLayers1 to vKey
			Send Destroy to hoLayers1
			Variant voLayer
		Get ComAdd of hoLayers vKey to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComLeft of hoPicture to "8"
					Set ComWidth of hoPicture to "width - 2 * 8"
					Set ComTop of hoPicture to "8"
					Set ComHeight of hoPicture to "height - 2 * 8"
					Variant v
						Variant vA
							Variant voLayers2
							Get ComLayers to voLayers2
							Handle hoLayers2
							Get Create (RefClass(cComLayers)) to hoLayers2
							Set pvComObject of hoLayers2 to voLayers2
								Get ComCount of hoLayers2 to vA
							Send Destroy to hoLayers2
						Get ComFormatABC "A mod 2 = 0 ? `x` : `o`" vA Nothing Nothing to v
					Set ComName of hoPicture to v
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComTransparency of hoLayer to 0
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "gBFLBCJwBAEHhEJAAEhABS0IQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAZAEiWIovRbHMBzFIMYRFFCcIRGSaYDiCNovTRNE7TfBMIhkGoSaKpCIRVDCSYJUzTc6wS79KgAASiJjjao6ZhaSpSABRYiyXRlHSxLiuYyoGTrJACEQxDhEEIjGLAazLMadJItCzabqGbJ8Ro6cQwTAIgI=" to Nothing
	Send Destroy to hoAppearance
	Set ComDefaultLayer OLEexDefLayerWidth to "width/3"
	Set ComDefaultLayer OLEexDefLayerHeight to "height/3"
	Set ComHTMLPicture "x" to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\x.png"
	Set ComHTMLPicture "o" to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\o.png"
	Set ComLayerAutoSize to -1
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 9
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer1
		Get ComItem of hoLayers4 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voColor
				Get ComColor of hoBackground1 to voColor
				Handle hoColor
				Get Create (RefClass(cComColor)) to hoColor
				Set pvComObject of hoColor to voColor
					Set ComValue of hoColor to |CI$1000000
				Send Destroy to hoColor
			Send Destroy to hoBackground1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer2
		Get ComItem of hoLayers5 1 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComLeft of hoLayer2 to " width/3 - 4"
			Variant voBackground2
			Get ComBackground of hoLayer2 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voColor1
				Get ComColor of hoBackground2 to voColor1
				Handle hoColor1
				Get Create (RefClass(cComColor)) to hoColor1
				Set pvComObject of hoColor1 to voColor1
					Set ComValue of hoColor1 to |CI$1000000
				Send Destroy to hoColor1
			Send Destroy to hoBackground2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer3
		Get ComItem of hoLayers6 2 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComLeft of hoLayer3 to "2 * (width/3 - 4) - 4"
			Variant voBackground3
			Get ComBackground of hoLayer3 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voColor2
				Get ComColor of hoBackground3 to voColor2
				Handle hoColor2
				Get Create (RefClass(cComColor)) to hoColor2
				Set pvComObject of hoColor2 to voColor2
					Set ComValue of hoColor2 to |CI$1000000
				Send Destroy to hoColor2
			Send Destroy to hoBackground3
		Send Destroy to hoLayer3
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer4
		Get ComItem of hoLayers7 3 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComTop of hoLayer4 to "height/3 - 4"
			Variant voBackground4
			Get ComBackground of hoLayer4 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voColor3
				Get ComColor of hoBackground4 to voColor3
				Handle hoColor3
				Get Create (RefClass(cComColor)) to hoColor3
				Set pvComObject of hoColor3 to voColor3
					Set ComValue of hoColor3 to |CI$1000000
				Send Destroy to hoColor3
			Send Destroy to hoBackground4
		Send Destroy to hoLayer4
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer5
		Get ComItem of hoLayers8 4 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Set ComTop of hoLayer5 to "height/3 - 4"
			Set ComLeft of hoLayer5 to " width/3 - 4"
			Variant voBackground5
			Get ComBackground of hoLayer5 to voBackground5
			Handle hoBackground5
			Get Create (RefClass(cComBackground)) to hoBackground5
			Set pvComObject of hoBackground5 to voBackground5
				Variant voColor4
				Get ComColor of hoBackground5 to voColor4
				Handle hoColor4
				Get Create (RefClass(cComColor)) to hoColor4
				Set pvComObject of hoColor4 to voColor4
					Set ComValue of hoColor4 to |CI$1000000
				Send Destroy to hoColor4
			Send Destroy to hoBackground5
		Send Destroy to hoLayer5
	Send Destroy to hoLayers8
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer6
		Get ComItem of hoLayers9 5 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComTop of hoLayer6 to "height/3 - 4"
			Set ComLeft of hoLayer6 to "2 * (width/3 - 4) - 4"
			Variant voBackground6
			Get ComBackground of hoLayer6 to voBackground6
			Handle hoBackground6
			Get Create (RefClass(cComBackground)) to hoBackground6
			Set pvComObject of hoBackground6 to voBackground6
				Variant voColor5
				Get ComColor of hoBackground6 to voColor5
				Handle hoColor5
				Get Create (RefClass(cComColor)) to hoColor5
				Set pvComObject of hoColor5 to voColor5
					Set ComValue of hoColor5 to |CI$1000000
				Send Destroy to hoColor5
			Send Destroy to hoBackground6
		Send Destroy to hoLayer6
	Send Destroy to hoLayers9
	Variant voLayers10
	Get ComLayers to voLayers10
	Handle hoLayers10
	Get Create (RefClass(cComLayers)) to hoLayers10
	Set pvComObject of hoLayers10 to voLayers10
		Variant voLayer7
		Get ComItem of hoLayers10 6 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComTop of hoLayer7 to "2 * (height/3 - 4) "
			Variant voBackground7
			Get ComBackground of hoLayer7 to voBackground7
			Handle hoBackground7
			Get Create (RefClass(cComBackground)) to hoBackground7
			Set pvComObject of hoBackground7 to voBackground7
				Variant voColor6
				Get ComColor of hoBackground7 to voColor6
				Handle hoColor6
				Get Create (RefClass(cComColor)) to hoColor6
				Set pvComObject of hoColor6 to voColor6
					Set ComValue of hoColor6 to |CI$1000000
				Send Destroy to hoColor6
			Send Destroy to hoBackground7
		Send Destroy to hoLayer7
	Send Destroy to hoLayers10
	Variant voLayers11
	Get ComLayers to voLayers11
	Handle hoLayers11
	Get Create (RefClass(cComLayers)) to hoLayers11
	Set pvComObject of hoLayers11 to voLayers11
		Variant voLayer8
		Get ComItem of hoLayers11 7 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComTop of hoLayer8 to "2 * (height/3 - 4) "
			Set ComLeft of hoLayer8 to " width/3 - 4"
			Variant voBackground8
			Get ComBackground of hoLayer8 to voBackground8
			Handle hoBackground8
			Get Create (RefClass(cComBackground)) to hoBackground8
			Set pvComObject of hoBackground8 to voBackground8
				Variant voColor7
				Get ComColor of hoBackground8 to voColor7
				Handle hoColor7
				Get Create (RefClass(cComColor)) to hoColor7
				Set pvComObject of hoColor7 to voColor7
					Set ComValue of hoColor7 to |CI$1000000
				Send Destroy to hoColor7
			Send Destroy to hoBackground8
		Send Destroy to hoLayer8
	Send Destroy to hoLayers11
	Variant voLayers12
	Get ComLayers to voLayers12
	Handle hoLayers12
	Get Create (RefClass(cComLayers)) to hoLayers12
	Set pvComObject of hoLayers12 to voLayers12
		Variant voLayer9
		Get ComItem of hoLayers12 8 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Set ComTop of hoLayer9 to "2 * (height/3 - 4) "
			Set ComLeft of hoLayer9 to "2 * (width/3 - 4) - 4"
			Variant voBackground9
			Get ComBackground of hoLayer9 to voBackground9
			Handle hoBackground9
			Get Create (RefClass(cComBackground)) to hoBackground9
			Set pvComObject of hoBackground9 to voBackground9
				Variant voColor8
				Get ComColor of hoBackground9 to voColor8
				Handle hoColor8
				Get Create (RefClass(cComColor)) to hoColor8
				Set pvComObject of hoColor8 to voColor8
					Set ComValue of hoColor8 to |CI$1000000
				Send Destroy to hoColor8
			Send Destroy to hoBackground9
		Send Destroy to hoLayer9
	Send Destroy to hoLayers12
	Set ComDefaultLayer OLEexDefLayerTransparency to 99
	Send ComEndUpdate
End_Procedure
57:
What's the difference Rotate vs Rotamove

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 227
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Button with LEDs"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
Get ComAdd of hoLayers "base" to Nothing		Send Destroy to hoLayers
		Variant voLayer
		Get ComAdd "rotate" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComToolTip of hoLayer to (ComKey(hoLayer))
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Example Button Up.png"
					Set ComLeft of hoPicture to "width/2"
					Set ComTop of hoPicture to "height/2"
					Set ComWidth of hoPicture to 128
					Set ComHeight of hoPicture to 64
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voForeground
			Get ComForeground of hoLayer to voForeground
			Handle hoForeground
			Get Create (RefClass(cComForeground)) to hoForeground
			Set pvComObject of hoForeground to voForeground
				Set ComCaption of hoForeground OLEexLayerCaption to "<font ;14><sha ;;0>Rotate"
				Set ComCaption of hoForeground OLEexLayerCaptionLeft to "width/2 + 32"
				Set ComCaption of hoForeground OLEexLayerCaptionTop to "height/2 + 16"
			Send Destroy to hoForeground
			Set ComBrightness of hoLayer OLEexRedChannel to 100
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Set ComRotateAngle of hoLayer to 45
		Send Destroy to hoLayer
		Variant voLayer1
		Get ComAdd "rotamove" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComToolTip of hoLayer1 to (ComKey(hoLayer1))
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Example Button Up.png"
					Set ComLeft of hoPicture1 to "width/2"
					Set ComTop of hoPicture1 to "height/2"
					Set ComWidth of hoPicture1 to 128
					Set ComHeight of hoPicture1 to 64
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Variant voForeground1
			Get ComForeground of hoLayer1 to voForeground1
			Handle hoForeground1
			Get Create (RefClass(cComForeground)) to hoForeground1
			Set pvComObject of hoForeground1 to voForeground1
				Set ComCaption of hoForeground1 OLEexLayerCaption to "<font ;14><sha ;;0>Rotamove"
				Set ComCaption of hoForeground1 OLEexLayerCaptionLeft to "width/2 + 24"
				Set ComCaption of hoForeground1 OLEexLayerCaptionTop to "height/2 + 16"
			Send Destroy to hoForeground1
			Set ComBrightness of hoLayer1 OLEexGreenChannel to 100
			Set ComRotateAngle of hoLayer1 to 45
			Set ComTransparency of hoLayer1 to 25
			Set ComOnDrag of hoLayer1 to OLEexDoRotamove
		Send Destroy to hoLayer1
End_Procedure
56:
How do I display a tooltip, when cursor hovers the layer

// Notifies that the cursor enters the layer.
Procedure OnComMouseIn Integer   llLayer
	Forward Send OnComMouseIn llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 9 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Variant vA
					Get ComValue to vA
				Get ComFormatABC "`The current value is: <br><c><b>` + ((100 - A) format ``)" vA Nothing Nothing to v
			Set ComToolTip of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Set ComCount of hoLayers1 to 10
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 9 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComDefaultRotateAngle of hoLayer1 to -126
			Set ComOnDrag of hoLayer1 to OLEexDoRotamove
			Set ComRotateAngleToValue of hoLayer1 to "100 - value / 360 * 100"
			Set ComValueToRotateAngle of hoLayer1 to "(value)/100 * 360"
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 3 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComVisible of hoLayer2 to False
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 4 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComVisible of hoLayer3 to False
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer4
		Get ComItem of hoLayers5 9 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComValue of hoLayer4 to 25
		Send Destroy to hoLayer4
	Send Destroy to hoLayers5
	Send ComEndUpdate
End_Procedure
55:
I've noticed that the OnDrag can move the layer itself, but how about moving the clipping region

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Layers(DragInfo.Layer).Clip.Ellipse
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComBackColor to (RGB(217,217,217))
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "background" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Guage_Background.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant voClipEllipse
				Get ComEllipse of hoClip to voClipEllipse
				Handle hoClipEllipse
				Get Create (RefClass(cComClipEllipse)) to hoClipEllipse
				Set pvComObject of hoClipEllipse to voClipEllipse
					Set ComRadiusX of hoClipEllipse to "width/3"
					Set ComRadiusY of hoClipEllipse to "height/3"
				Send Destroy to hoClipEllipse
			Send Destroy to hoClip
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "needle" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Guage_Needle.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Send ComEndUpdate
End_Procedure
54:
How do I show a portion of layer with a different color (sample 2)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "Color" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v
					Variant voLayers1
					Get ComLayers to voLayers1
					Handle hoLayers1
					Get Create (RefClass(cComLayers)) to hoLayers1
					Set pvComObject of hoLayers1 to voLayers1
						Variant voLayer1
						Get ComItem of hoLayers1 "Thumb" to voLayer1
						Handle hoLayer1
						Get Create (RefClass(cComLayer)) to hoLayer1
						Set pvComObject of hoLayer1 to voLayer1
							Variant voLayer2
							Get ComItem of hoLayer1 "Thumb" to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Get ComRotateAngle of hoLayer2 to v
							Send Destroy to hoLayer2
						Send Destroy to hoLayer1
					Send Destroy to hoLayers1
				Set ComValue of hoClip to v
			Send Destroy to hoClip
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer3
		Get ComItem of hoLayers2 "Color" to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComBrightness of hoLayer3 OLEexBlueChannel to (ComRotateAngle(hoLayer3))
		Send Destroy to hoLayer3
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer4
		Get ComItem of hoLayers3 "Thumb" to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant v1
				Variant voLayers4
				Get ComLayers to voLayers4
				Handle hoLayers4
				Get Create (RefClass(cComLayers)) to hoLayers4
				Set pvComObject of hoLayers4 to voLayers4
					Variant voLayer5
					Get ComItem of hoLayers4 "Color" to voLayer5
					Handle hoLayer5
					Get Create (RefClass(cComLayer)) to hoLayer5
					Set pvComObject of hoLayer5 to voLayer5
						Variant voLayer6
						Get ComItem of hoLayer5 "Color" to voLayer6
						Handle hoLayer6
						Get Create (RefClass(cComLayer)) to hoLayer6
						Set pvComObject of hoLayer6 to voLayer6
							Get ComRotateAngle of hoLayer6 to v1
						Send Destroy to hoLayer6
					Send Destroy to hoLayer5
				Send Destroy to hoLayers4
			Set ComBrightness of hoLayer4 OLEexBlueChannel to v1
		Send Destroy to hoLayer4
	Send Destroy to hoLayers3
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Set ComCount of hoLayers5 to 5
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer7
		Get ComItem of hoLayers6 1 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComVisible of hoLayer7 to False
		Send Destroy to hoLayer7
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer8
		Get ComItem of hoLayers7 4 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComKey of hoLayer8 to "Thumb"
			Set ComDefaultRotateAngle of hoLayer8 to -141
			Set ComOnDrag of hoLayer8 to OLEexDoRotate
			Set ComRotateType of hoLayer8 to OLEexRotateBilinearInterpolation
			Set ComBrightness of hoLayer8 OLEexAllChannels to 0
			Set ComBrightness of hoLayer8 OLEexRedChannel to 100
		Send Destroy to hoLayer8
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer9
		Get ComAdd of hoLayers8 "Color" to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Set ComOnDrag of hoLayer9 to OLEexDoRotate
			Set ComPosition of hoLayer9 to 3
			Set ComBrightness of hoLayer9 OLEexAllChannels to 0
			Set ComBrightness of hoLayer9 OLEexRedChannel to 100
			Variant voBackground
			Get ComBackground of hoLayer9 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Layer3.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip1
			Get ComClip of hoLayer9 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant voClipPie
				Get ComPie of hoClip1 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComSweepAngle of hoClipPie to "value"
				Send Destroy to hoClipPie
			Send Destroy to hoClip1
			Variant voClip2
			Get ComClip of hoLayer9 to voClip2
			Handle hoClip2
			Get Create (RefClass(cComClip)) to hoClip2
			Set pvComObject of hoClip2 to voClip2
				Variant voClipEllipse
				Get ComEllipse of hoClip2 to voClipEllipse
				Handle hoClipEllipse
				Get Create (RefClass(cComClipEllipse)) to hoClipEllipse
				Set pvComObject of hoClipEllipse to voClipEllipse
					Set ComRadiusX of hoClipEllipse to "150"
					Set ComRadiusY of hoClipEllipse to "150"
					Set ComInverseClip of hoClipEllipse to True
				Send Destroy to hoClipEllipse
			Send Destroy to hoClip2
		Send Destroy to hoLayer9
	Send Destroy to hoLayers8
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer10
		Get ComItem of hoLayers9 "Thumb" to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Set ComRotateAngle of hoLayer10 to 135
		Send Destroy to hoLayer10
	Send Destroy to hoLayers9
	Send ComEndUpdate
End_Procedure
53:
How do I show a portion of layer with a different color (sample 1)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "Color" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v
					Variant voLayers1
					Get ComLayers to voLayers1
					Handle hoLayers1
					Get Create (RefClass(cComLayers)) to hoLayers1
					Set pvComObject of hoLayers1 to voLayers1
						Variant voLayer1
						Get ComItem of hoLayers1 "Thumb" to voLayer1
						Handle hoLayer1
						Get Create (RefClass(cComLayer)) to hoLayer1
						Set pvComObject of hoLayer1 to voLayer1
							Variant voLayer2
							Get ComItem of hoLayer1 "Thumb" to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Get ComRotateAngle of hoLayer2 to v
							Send Destroy to hoLayer2
						Send Destroy to hoLayer1
					Send Destroy to hoLayers1
				Set ComValue of hoClip to v
			Send Destroy to hoClip
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer3
		Get ComItem of hoLayers2 "Color" to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComBrightness of hoLayer3 OLEexBlueChannel to (ComRotateAngle(hoLayer3))
		Send Destroy to hoLayer3
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer4
		Get ComItem of hoLayers3 "Thumb" to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant v1
				Variant voLayers4
				Get ComLayers to voLayers4
				Handle hoLayers4
				Get Create (RefClass(cComLayers)) to hoLayers4
				Set pvComObject of hoLayers4 to voLayers4
					Variant voLayer5
					Get ComItem of hoLayers4 "Color" to voLayer5
					Handle hoLayer5
					Get Create (RefClass(cComLayer)) to hoLayer5
					Set pvComObject of hoLayer5 to voLayer5
						Variant voLayer6
						Get ComItem of hoLayer5 "Color" to voLayer6
						Handle hoLayer6
						Get Create (RefClass(cComLayer)) to hoLayer6
						Set pvComObject of hoLayer6 to voLayer6
							Get ComRotateAngle of hoLayer6 to v1
						Send Destroy to hoLayer6
					Send Destroy to hoLayer5
				Send Destroy to hoLayers4
			Set ComBrightness of hoLayer4 OLEexBlueChannel to v1
		Send Destroy to hoLayer4
	Send Destroy to hoLayers3
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Set ComCount of hoLayers5 to 5
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer7
		Get ComItem of hoLayers6 1 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComVisible of hoLayer7 to False
		Send Destroy to hoLayer7
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer8
		Get ComItem of hoLayers7 4 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComKey of hoLayer8 to "Thumb"
			Set ComDefaultRotateAngle of hoLayer8 to -141
			Set ComOnDrag of hoLayer8 to OLEexDoRotate
			Set ComRotateType of hoLayer8 to OLEexRotateBilinearInterpolation
			Set ComBrightness of hoLayer8 OLEexAllChannels to 0
			Set ComBrightness of hoLayer8 OLEexGreenChannel to 100
		Send Destroy to hoLayer8
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer9
		Get ComAdd of hoLayers8 "Color" to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Set ComOnDrag of hoLayer9 to OLEexDoRotate
			Set ComPosition of hoLayer9 to 3
			Set ComBrightness of hoLayer9 OLEexAllChannels to 0
			Set ComBrightness of hoLayer9 OLEexGreenChannel to 100
			Variant voBackground
			Get ComBackground of hoLayer9 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Layer3.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip1
			Get ComClip of hoLayer9 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant voClipPie
				Get ComPie of hoClip1 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComSweepAngle of hoClipPie to "value"
				Send Destroy to hoClipPie
			Send Destroy to hoClip1
		Send Destroy to hoLayer9
	Send Destroy to hoLayers8
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer10
		Get ComItem of hoLayers9 "Thumb" to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Set ComRotateAngle of hoLayer10 to 135
		Send Destroy to hoLayer10
	Send Destroy to hoLayers9
	Send ComEndUpdate
End_Procedure
52:
How can I display / clip a picture with no transparency

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "default" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComOnDrag of hoLayer to OLEexDoMove
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Layer2.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComDefaultOffsetY of hoLayer to -164
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "notransparency" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComOnDrag of hoLayer1 to OLEexDoMove
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Layer2.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Variant voClip
			Get ComClip of hoLayer1 to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant voClipPicture
				Get ComPicture of hoClip to voClipPicture
				Handle hoClipPicture
				Get Create (RefClass(cComClipPicture)) to hoClipPicture
				Set pvComObject of hoClipPicture to voClipPicture
					Variant v
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 "notransparency" to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 "notransparency" to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voBackground2
									Get ComBackground of hoLayer3 to voBackground2
									Handle hoBackground2
									Get Create (RefClass(cComBackground)) to hoBackground2
									Set pvComObject of hoBackground2 to voBackground2
										Variant voPicture2
										Get ComPicture of hoBackground2 to voPicture2
										Handle hoPicture2
										Get Create (RefClass(cComPicture)) to hoPicture2
										Set pvComObject of hoPicture2 to voPicture2
											Get ComName of hoPicture2 to v
										Send Destroy to hoPicture2
									Send Destroy to hoBackground2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Set ComName of hoClipPicture to v
					Set ComAlphaTo of hoClipPicture to "128"
				Send Destroy to hoClipPicture
			Send Destroy to hoClip
			Set ComGrayscale of hoLayer1 to True
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Send ComEndUpdate
End_Procedure
51:
How can I resize all layers

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 5
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComAdd of hoLayers1 "autosize" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComVisible of hoLayer to False
			Set ComWidth of hoLayer to 164
			Set ComHeight of hoLayer to 128
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant v
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 "autosize" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Get ComIndex of hoLayer1 to v
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Set ComLayerAutoSize to v
	Send ComEndUpdate
End_Procedure
50:
How can I start moving any layer when user clicks it

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

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
End_Procedure
49:
How can I prevent dragging the layers when user right click it
// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// Cancel = Me.FormatABC("A=2",DragInfo.Button)
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComOnDrag of hoLayer to OLEexDoMove
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
End_Procedure
48:
Is your control DPI-Aware

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 3 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComGrayscale of hoLayer to True
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 4 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComGrayscale of hoLayer1 to True
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 10 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComWidth of hoLayer2 to "128 * dpix"
			Set ComHeight of hoLayer2 to "128 * dpiy"
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 9 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComOnDrag of hoLayer3 to OLEexDoRotate
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Set ComLayerAutoSize to 10
End_Procedure
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

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 10
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 9 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComRotateType of hoLayer to OLEexRotateBilinearInterpolation
			Set ComOnDrag of hoLayer to OLEexDoRotate
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Set ComAllowMoveOnClick to True
	Set ComLayerUpdate to OLEexLayerUpdateScreen
End_Procedure
46:
How can I show the layers on perspective

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 10
	Send Destroy to hoLayers
	Set ComDebug to OLEexDebugLayers
End_Procedure
45:
Is it possible to resize all layers after they are loaded (method 2)

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 3 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComGrayscale of hoLayer to True
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 4 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComGrayscale of hoLayer1 to True
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 9 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComOnDrag of hoLayer2 to OLEexDoRotate
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 10 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComWidth of hoLayer3 to 128
			Set ComHeight of hoLayer3 to 128
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Set ComLayerAutoSize to 10
End_Procedure
44:
Is it possible to resize all layers after they are loaded (method 1)

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 10
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 3 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComGrayscale of hoLayer to True
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 4 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComGrayscale of hoLayer1 to True
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Set ComLayerAutoSize to -1
End_Procedure
43:
Is it possible to load images for different layers from different folders

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 12
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "\..\Clock\vista_clock.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 9 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "\..\Knob 2\Layer3.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 10 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant voBackground2
			Get ComBackground of hoLayer2 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noBack.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 11 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComDefaultOffsetX of hoLayer3 to 64
			Set ComDefaultOffsetY of hoLayer3 to -36
			Variant voBackground3
			Get ComBackground of hoLayer3 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to ("gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQEX5JIhBKhYQrFSxNNhUKoUY7/c6+R6+a7pPg0UAjaISTQwCzMEgtWQ2IyDBJJMYiNJCJgTVJuMghNTcSgFAxlNZiMinYKNRQ2NxMBhWNQkSRUAQkRRNEhYEBhMogMADOwGfY6N7eXb3DgXeamZgMGbQIStE55RZ7c7ce7/XpzZycOaBf7ZNAlZwiGQIMAnQBnAL4ACKAACABXADMAY4BLgHYiXS6VQAESyDbAHYAGwvea9E4BXhPIgXD4KQCZD4FeAJzqWFLcNQf1KkSgyFYGMDmVoAEwAHjxQDiOo7AbgKqlaj8WQBRgxDYBfmabpDRTXdumF5ZSwVboXIBrToAhgBIwHWFREvoNZtlsb42G6Kg2g4b59AeYgAnAMpWnqBZWk2JoIkQcY8AGQAvgAPBWkcScUnceh6FoLYWAsepsGwLBsCcMIMh8C4AHYOAODOVIUHaYwviKMgvh2eIxmORxcnHJ5MjYExBlmM5nBAVgqGodY9nuFxXGoA5al8WIJmAe5OgAIxtD6bJUimU5uC4GxFiOaxXkOc59lwOh0kkFYREWFZ6iSdhiiMQBSg0VArFWAZ0CgepijEKJdlcBZnnuaJ2n2PBZCgaAHnESZsHmRpFlKBBECQY5hA2DoOgaYYYCoC4zjObpAkCAJ+mVGgQBEFZ7CSVgbgYYYGk8c4ugODRFFgKRUnYAZ4C8E5ECqWwOl8d5/gcGgjmALQRjiUBQmg9oVDWBAIFoAZ8DmBoAlcWoBlwWAjHEK5pnSehpDALR9A2U1+FWAB3B2X4rmCJwaBcLQNmiG4AG8do6FkLRWjEOw7GsEwRBQUogCIEBRH0LJEAQeR8h4c55jyXwDmAK9TlMLIoBcS4pgAZwBGwaB3FIGIDBHopsmWS4Xh2HpUgoPhvkOcYcWANBWiCIh5GicJhnKUOvCcJp0CIGxNg6doEIUUopHSGoAA+OhhFeKgVBoGIYnCfo7HcTgdhuG4zkWBB68GdJmkKQQPcSVx6Hue47l0foMAAZ5yjkXJTBoW5ekgSglFKZ4AAYO5BDwIAdkgZZykcWg3G8OoPlgNpDicT4fH6AwZk+M4zDEMwZGMVB9GGZgqGeO51kmfAbnyGQZjSVofmeepzB8Nojmqah+gQEAzCsKfvgoI5oniYOvCCZaghiWfeiWNY2mOOJ2CMKJyDUVpOhwR38EcDpWlq/4Ox6xLAxCMIkRAShQCoC4C4D42RaCpH+BAGY1wDiDFoGgbwFQIjbHuH0Y48x+BUCeE8O47h0DRBeN8FwFAFC7ESMgJ4AAOARFyCsOQSgIhbEsK0FoywZC2DaOsFAig3DOGYMwPguAzjPE8G8QZFT1ghEA5IG4QhaHIB4M8JragUitDqK5jIrhvj2HoLYU49hHjvA+NsWQZRligHWLoDwRAkAaGcBICIExIshBwAgQQ8ojjMCeAcB4Hh8DiGMI0X4rhiixEyNcLQBwRASAEIgKAKxjB7CMEAfIfhbjrB0E4JQGxOgWEiF4CIzhFjgDi+gfQdh2jaBqLQPo+x7CNHSEwYwfwWCfHeA5WYXgsBYAQG4bougag/B6P0eYHwpg/A4D8F4pBXArGQJwRI9RviGHyDYQARQAAVAAPoTwAACCQGoCADgrxljzF0KwVwbgDBnGIJIDgGxnCxHgDoGInAxhmC+O4agjwUCQBMEIVAiA3ALCiMkRAKgAhcGsHEKgTg3BFikGoEQ3hqCkE0DsMILQbgCGADgVwGwsiOCKCYGQBBAgREiKoRABIkATGYK4AAThJAGBCEACYEAEhRGKBAFoCAmBgEYAkSQCQthtEuPsWwAAkgUCIAARzUgnD3HoHAS46xMDFWgDUbQLAlDMgiKsFwIw2AzGwEoUQJXQjXCIGIAwQhUh9DiJQBAxwQAwFID0IA2wjCkCQBEBYUw3g2AWMsKwNAvgqFWLQJIOwbAcBOEIMgLwxDRGkNACw7gAAwDUPkRokwYBrCKKQLo1xKhIDWGEMYOhnCGD+AETIaBOC" + ;
"ABEEYVY0yI1SCKE4IgrghBgEEQEA=")
					Set ComWidth of hoPicture3 to 64
					Set ComHeight of hoPicture3 to 64
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
End_Procedure
42:
How can I specify whether an object can be selected or not

// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Showln (ComLayerFromPoint(Self,-1,-1))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 12
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 10 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComRotateType of hoLayer to OLEexRotateBilinearInterpolation
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComExtraPicture of hoBackground "extra1" to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Layer1.png"
					Set ComLeft of hoPicture to "32"
					Set ComTop of hoPicture to "32"
					Set ComWidth of hoPicture to 64
					Set ComHeight of hoPicture to 64
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voForeground
			Get ComForeground of hoLayer to voForeground
			Handle hoForeground
			Get Create (RefClass(cComForeground)) to hoForeground
			Set pvComObject of hoForeground to voForeground
				Set ComCaption of hoForeground OLEexLayerCaption to "<sha ;;0>selectable"
				Set ComCaption of hoForeground OLEexLayerCaptionLeft to 38
				Set ComCaption of hoForeground OLEexLayerCaptionTop to -5
			Send Destroy to hoForeground
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 11 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground1
			Get ComBackground of hoLayer1 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComExtraPicture of hoBackground1 "extra2" to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Layer1.png"
					Set ComLeft of hoPicture1 to "width-64"
					Set ComTop of hoPicture1 to "height-84 - 32"
					Set ComWidth of hoPicture1 to 64
					Set ComHeight of hoPicture1 to 64
					Set ComSelectable of hoPicture1 to False
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComBrightness of hoLayer1 OLEexAllChannels to 25
			Variant voForeground1
			Get ComForeground of hoLayer1 to voForeground1
			Handle hoForeground1
			Get Create (RefClass(cComForeground)) to hoForeground1
			Set pvComObject of hoForeground1 to voForeground1
				Set ComCaption of hoForeground1 OLEexLayerCaption to "<sha ;;0>not selectable"
				Set ComCaption of hoForeground1 OLEexLayerCaptionAnchor to 8
				Set ComCaption of hoForeground1 OLEexLayerCaptionTop to "height-theight/4"
			Send Destroy to hoForeground1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Send ComEndUpdate
End_Procedure
41:
How do I get the layer/object/picture from the cursor
// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Showln (ComLayerFromPoint(Self,-1,-1))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 10
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 9 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComRotateType of hoLayer to OLEexRotateBilinearInterpolation
			Set ComOnDrag of hoLayer to OLEexDoRotate
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
End_Procedure
40:
How can I display a speedometer

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
		Variant voLayers
		Get ComLayers to voLayers
		Handle hoLayers
		Get Create (RefClass(cComLayers)) to hoLayers
		Set pvComObject of hoLayers to voLayers
			Variant voLayer
			Get ComItem of hoLayers "arc" to voLayer
			Handle hoLayer
			Get Create (RefClass(cComLayer)) to hoLayer
			Set pvComObject of hoLayer to voLayer
				Variant voLayer1
				Get ComItem of hoLayer "arc" to voLayer1
				Handle hoLayer1
				Get Create (RefClass(cComLayer)) to hoLayer1
				Set pvComObject of hoLayer1 to voLayer1
					Variant voClip
					Get ComClip of hoLayer1 to voClip
					Handle hoClip
					Get Create (RefClass(cComClip)) to hoClip
					Set pvComObject of hoClip to voClip
						Variant v
							Get ComValue to v
						Set ComValue of hoClip to v
					Send Destroy to hoClip
				Send Destroy to hoLayer1
			Send Destroy to hoLayer
		Send Destroy to hoLayers
		Variant voLayers1
		Get ComLayers to voLayers1
		Handle hoLayers1
		Get Create (RefClass(cComLayers)) to hoLayers1
		Set pvComObject of hoLayers1 to voLayers1
			Variant voLayer2
			Get ComItem of hoLayers1 "noDigit" to voLayer2
			Handle hoLayer2
			Get Create (RefClass(cComLayer)) to hoLayer2
			Set pvComObject of hoLayer2 to voLayer2
				Variant voLayer3
				Get ComItem of hoLayer2 "noDigit" to voLayer3
				Handle hoLayer3
				Get Create (RefClass(cComLayer)) to hoLayer3
				Set pvComObject of hoLayer3 to voLayer3
					Variant voBackground
					Get ComBackground of hoLayer3 to voBackground
					Handle hoBackground
					Get Create (RefClass(cComBackground)) to hoBackground
					Set pvComObject of hoBackground to voBackground
						Variant voPicture
						Get ComExtraPicture of hoBackground "80" to voPicture
						Handle hoPicture
						Get Create (RefClass(cComPicture)) to hoPicture
						Set pvComObject of hoPicture to voPicture
							Variant v1
								Variant vA
									Get ComValue to vA
								Get ComFormatABC "`no` + int((value MIN 0 MAX 99)/10) + `.png`" vA Nothing Nothing to v1
							Set ComName of hoPicture to v1
						Send Destroy to hoPicture
					Send Destroy to hoBackground
				Send Destroy to hoLayer3
			Send Destroy to hoLayer2
		Send Destroy to hoLayers1
		Variant voLayers2
		Get ComLayers to voLayers2
		Handle hoLayers2
		Get Create (RefClass(cComLayers)) to hoLayers2
		Set pvComObject of hoLayers2 to voLayers2
			Variant voLayer4
			Get ComItem of hoLayers2 "noDigit" to voLayer4
			Handle hoLayer4
			Get Create (RefClass(cComLayer)) to hoLayer4
			Set pvComObject of hoLayer4 to voLayer4
				Variant voLayer5
				Get ComItem of hoLayer4 "noDigit" to voLayer5
				Handle hoLayer5
				Get Create (RefClass(cComLayer)) to hoLayer5
				Set pvComObject of hoLayer5 to voLayer5
					Variant voBackground1
					Get ComBackground of hoLayer5 to voBackground1
					Handle hoBackground1
					Get Create (RefClass(cComBackground)) to hoBackground1
					Set pvComObject of hoBackground1 to voBackground1
						Variant voPicture1
						Get ComExtraPicture of hoBackground1 "08" to voPicture1
						Handle hoPicture1
						Get Create (RefClass(cComPicture)) to hoPicture1
						Set pvComObject of hoPicture1 to voPicture1
							Variant v2
								Variant vA1
									Get ComValue to vA1
								Get ComFormatABC "`no` + int((value MIN 0 MAX 99) mod 10) + `.png`" vA1 Nothing Nothing to v2
							Set ComName of hoPicture1 to v2
						Send Destroy to hoPicture1
					Send Destroy to hoBackground1
				Send Destroy to hoLayer5
			Send Destroy to hoLayer4
		Send Destroy to hoLayers2
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v3
		Variant vA2
			Get ComValue to vA2
		Get ComFormatABC "value + B" vA2 llDelta Nothing to v3
	Set ComValue to v3
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComBackColor to (RGB(40,40,40))
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 6
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer6
		Get ComItem of hoLayers4 0 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComKey of hoLayer6 to "arcBack"
			Variant voBackground2
			Get ComBackground of hoLayer6 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "noArcBack.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Variant voClip1
			Get ComClip of hoLayer6 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant voClipPie
				Get ComPie of hoClip1 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComStartAngle of hoClipPie to 240
					Set ComSweepAngle of hoClipPie to 240
				Send Destroy to hoClipPie
			Send Destroy to hoClip1
		Send Destroy to hoLayer6
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer7
		Get ComItem of hoLayers5 1 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComKey of hoLayer7 to "arc"
			Variant voBackground3
			Get ComBackground of hoLayer7 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "noArc.png"
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Variant voClip2
			Get ComClip of hoLayer7 to voClip2
			Handle hoClip2
			Get Create (RefClass(cComClip)) to hoClip2
			Set pvComObject of hoClip2 to voClip2
				Variant voClipPie1
				Get ComPie of hoClip2 to voClipPie1
				Handle hoClipPie1
				Get Create (RefClass(cComClipPie)) to hoClipPie1
				Set pvComObject of hoClipPie1 to voClipPie1
					Set ComStartAngle of hoClipPie1 to 240
					Set ComSweepAngle of hoClipPie1 to "value/100 * 240"
				Send Destroy to hoClipPie1
			Send Destroy to hoClip2
		Send Destroy to hoLayer7
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer8
		Get ComItem of hoLayers6 2 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComRotateType of hoLayer8 to OLEexRotateBilinearInterpolation
			Set ComKey of hoLayer8 to "pointer"
			Variant voBackground4
			Get ComBackground of hoLayer8 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voPicture4
				Get ComPicture of hoBackground4 to voPicture4
				Handle hoPicture4
				Get Create (RefClass(cComPicture)) to hoPicture4
				Set pvComObject of hoPicture4 to voPicture4
					Set ComName of hoPicture4 to "noLine.png"
				Send Destroy to hoPicture4
			Send Destroy to hoBackground4
			Set ComDefaultRotateAngle of hoLayer8 to 240
			Set ComRotateAngleToValue of hoLayer8 to "value/240 * 100"
			Set ComValueToRotateAngle of hoLayer8 to "value / 100 * 240"
			Set ComRotateAngleValid of hoLayer8 to "value > 240 ? (value > 300 ? 0 : 240) : value"
			Set ComOnDrag of hoLayer8 to OLEexDoRotate
		Send Destroy to hoLayer8
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer9
		Get ComItem of hoLayers7 3 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Set ComKey of hoLayer9 to "noBack"
			Set ComLeft of hoLayer9 to "(width - 55 * 2)/2"
			Set ComTop of hoLayer9 to "(height - 94 * 1)/2"
			Set ComWidth of hoLayer9 to "2 * 45 + 8"
			Set ComHeight of hoLayer9 to "1 * 94"
			Set ComTransparency of hoLayer9 to 90
			Variant voBackground5
			Get ComBackground of hoLayer9 to voBackground5
			Handle hoBackground5
			Get Create (RefClass(cComBackground)) to hoBackground5
			Set pvComObject of hoBackground5 to voBackground5
				Variant voPicture5
				Get ComExtraPicture of hoBackground5 "80" to voPicture5
				Handle hoPicture5
				Get Create (RefClass(cComPicture)) to hoPicture5
				Set pvComObject of hoPicture5 to voPicture5
					Set ComName of hoPicture5 to "noBack.png"
					Set ComLeft of hoPicture5 to "-4"
					Set ComWidth of hoPicture5 to "70"
				Send Destroy to hoPicture5
			Send Destroy to hoBackground5
			Variant voBackground6
			Get ComBackground of hoLayer9 to voBackground6
			Handle hoBackground6
			Get Create (RefClass(cComBackground)) to hoBackground6
			Set pvComObject of hoBackground6 to voBackground6
				Variant voPicture6
				Get ComExtraPicture of hoBackground6 "08" to voPicture6
				Handle hoPicture6
				Get Create (RefClass(cComPicture)) to hoPicture6
				Set pvComObject of hoPicture6 to voPicture6
					Set ComName of hoPicture6 to "noBack.png"
					Set ComLeft of hoPicture6 to "36"
					Set ComWidth of hoPicture6 to 70
				Send Destroy to hoPicture6
			Send Destroy to hoBackground6
		Send Destroy to hoLayer9
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer10
		Get ComItem of hoLayers8 4 to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Set ComKey of hoLayer10 to "noDigit"
			Set ComLeft of hoLayer10 to "(width - 55 * 2)/2"
			Set ComTop of hoLayer10 to "(height - 94 * 1)/2"
			Set ComWidth of hoLayer10 to "2 * 45 + 8"
			Set ComHeight of hoLayer10 to "1 * 94"
			Variant voBackground7
			Get ComBackground of hoLayer10 to voBackground7
			Handle hoBackground7
			Get Create (RefClass(cComBackground)) to hoBackground7
			Set pvComObject of hoBackground7 to voBackground7
				Variant voPicture7
				Get ComExtraPicture of hoBackground7 "80" to voPicture7
				Handle hoPicture7
				Get Create (RefClass(cComPicture)) to hoPicture7
				Set pvComObject of hoPicture7 to voPicture7
					Set ComName of hoPicture7 to "no1.png"
					Set ComLeft of hoPicture7 to "-4"
					Set ComWidth of hoPicture7 to "70"
				Send Destroy to hoPicture7
			Send Destroy to hoBackground7
			Variant voBackground8
			Get ComBackground of hoLayer10 to voBackground8
			Handle hoBackground8
			Get Create (RefClass(cComBackground)) to hoBackground8
			Set pvComObject of hoBackground8 to voBackground8
				Variant voPicture8
				Get ComExtraPicture of hoBackground8 "08" to voPicture8
				Handle hoPicture8
				Get Create (RefClass(cComPicture)) to hoPicture8
				Set pvComObject of hoPicture8 to voPicture8
					Set ComName of hoPicture8 to "no2.png"
					Set ComLeft of hoPicture8 to "36"
					Set ComWidth of hoPicture8 to 70
				Send Destroy to hoPicture8
			Send Destroy to hoBackground8
		Send Destroy to hoLayer10
	Send Destroy to hoLayers8
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer11
		Get ComItem of hoLayers9 5 to voLayer11
		Handle hoLayer11
		Get Create (RefClass(cComLayer)) to hoLayer11
		Set pvComObject of hoLayer11 to voLayer11
			Set ComKey of hoLayer11 to "noCap"
			Variant voBackground9
			Get ComBackground of hoLayer11 to voBackground9
			Handle hoBackground9
			Get Create (RefClass(cComBackground)) to hoBackground9
			Set pvComObject of hoBackground9 to voBackground9
				Variant voPicture9
				Get ComPicture of hoBackground9 to voPicture9
				Handle hoPicture9
				Get Create (RefClass(cComPicture)) to hoPicture9
				Set pvComObject of hoPicture9 to voPicture9
					Set ComName of hoPicture9 to "noCap.png"
				Send Destroy to hoPicture9
			Send Destroy to hoBackground9
			Set ComTransparency of hoLayer11 to 45
		Send Destroy to hoLayer11
	Send Destroy to hoLayers9
		Variant voLayers10
		Get ComLayers to voLayers10
		Handle hoLayers10
		Get Create (RefClass(cComLayers)) to hoLayers10
		Set pvComObject of hoLayers10 to voLayers10
			Variant voLayer12
			Get ComItem of hoLayers10 "pointer" to voLayer12
			Handle hoLayer12
			Get Create (RefClass(cComLayer)) to hoLayer12
			Set pvComObject of hoLayer12 to voLayer12
				Variant voLayer13
				Get ComItem of hoLayer12 "pointer" to voLayer13
				Handle hoLayer13
				Get Create (RefClass(cComLayer)) to hoLayer13
				Set pvComObject of hoLayer13 to voLayer13
					Variant v4
						Variant voLayers11
						Get ComLayers to voLayers11
						Handle hoLayers11
						Get Create (RefClass(cComLayers)) to hoLayers11
						Set pvComObject of hoLayers11 to voLayers11
							Variant voLayer14
							Get ComItem of hoLayers11 "noCap" to voLayer14
							Handle hoLayer14
							Get Create (RefClass(cComLayer)) to hoLayer14
							Set pvComObject of hoLayer14 to voLayer14
								Variant voLayer15
								Get ComItem of hoLayer14 "noCap" to voLayer15
								Handle hoLayer15
								Get Create (RefClass(cComLayer)) to hoLayer15
								Set pvComObject of hoLayer15 to voLayer15
									Get ComPosition of hoLayer15 to v4
								Send Destroy to hoLayer15
							Send Destroy to hoLayer14
						Send Destroy to hoLayers11
					Set ComPosition of hoLayer13 to v4
				Send Destroy to hoLayer13
			Send Destroy to hoLayer12
		Send Destroy to hoLayers10
	Variant v5
		Variant voLayers12
		Get ComLayers to voLayers12
		Handle hoLayers12
		Get Create (RefClass(cComLayers)) to hoLayers12
		Set pvComObject of hoLayers12 to voLayers12
			Variant voLayer16
			Get ComItem of hoLayers12 "pointer" to voLayer16
			Handle hoLayer16
			Get Create (RefClass(cComLayer)) to hoLayer16
			Set pvComObject of hoLayer16 to voLayer16
				Variant voLayer17
				Get ComItem of hoLayer16 "pointer" to voLayer17
				Handle hoLayer17
				Get Create (RefClass(cComLayer)) to hoLayer17
				Set pvComObject of hoLayer17 to voLayer17
					Get ComIndex of hoLayer17 to v5
				Send Destroy to hoLayer17
			Send Destroy to hoLayer16
		Send Destroy to hoLayers12
	Set ComLayerOfValue to v5
	Set ComValue to 56
	Send ComEndUpdate
End_Procedure
39:
How can I display LED-numbers

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant v
		Get ComFormatABC "value MIN 0 MAX 99" (ComValue(Self)) Nothing Nothing to v
	Set ComValue to v
		Variant voLayers
		Get ComLayers to voLayers
		Handle hoLayers
		Get Create (RefClass(cComLayers)) to hoLayers
		Set pvComObject of hoLayers to voLayers
			Variant voLayer
			Get ComItem of hoLayers "noDigit" to voLayer
			Handle hoLayer
			Get Create (RefClass(cComLayer)) to hoLayer
			Set pvComObject of hoLayer to voLayer
				Variant voLayer1
				Get ComItem of hoLayer "noDigit" to voLayer1
				Handle hoLayer1
				Get Create (RefClass(cComLayer)) to hoLayer1
				Set pvComObject of hoLayer1 to voLayer1
					Variant voBackground
					Get ComBackground of hoLayer1 to voBackground
					Handle hoBackground
					Get Create (RefClass(cComBackground)) to hoBackground
					Set pvComObject of hoBackground to voBackground
						Variant voPicture
						Get ComExtraPicture of hoBackground "80" to voPicture
						Handle hoPicture
						Get Create (RefClass(cComPicture)) to hoPicture
						Set pvComObject of hoPicture to voPicture
							Variant v1
								Variant vA
									Get ComValue to vA
								Get ComFormatABC "`no` + int((value MIN 0 MAX 99)/10) + `.png`" vA Nothing Nothing to v1
							Set ComName of hoPicture to v1
						Send Destroy to hoPicture
					Send Destroy to hoBackground
				Send Destroy to hoLayer1
			Send Destroy to hoLayer
		Send Destroy to hoLayers
		Variant voLayers1
		Get ComLayers to voLayers1
		Handle hoLayers1
		Get Create (RefClass(cComLayers)) to hoLayers1
		Set pvComObject of hoLayers1 to voLayers1
			Variant voLayer2
			Get ComItem of hoLayers1 "noDigit" to voLayer2
			Handle hoLayer2
			Get Create (RefClass(cComLayer)) to hoLayer2
			Set pvComObject of hoLayer2 to voLayer2
				Variant voLayer3
				Get ComItem of hoLayer2 "noDigit" to voLayer3
				Handle hoLayer3
				Get Create (RefClass(cComLayer)) to hoLayer3
				Set pvComObject of hoLayer3 to voLayer3
					Variant voBackground1
					Get ComBackground of hoLayer3 to voBackground1
					Handle hoBackground1
					Get Create (RefClass(cComBackground)) to hoBackground1
					Set pvComObject of hoBackground1 to voBackground1
						Variant voPicture1
						Get ComExtraPicture of hoBackground1 "08" to voPicture1
						Handle hoPicture1
						Get Create (RefClass(cComPicture)) to hoPicture1
						Set pvComObject of hoPicture1 to voPicture1
							Variant v2
								Variant vA1
									Get ComValue to vA1
								Get ComFormatABC "`no` + int((value MIN 0 MAX 99) mod 10) + `.png`" vA1 Nothing Nothing to v2
							Set ComName of hoPicture1 to v2
						Send Destroy to hoPicture1
					Send Destroy to hoBackground1
				Send Destroy to hoLayer3
			Send Destroy to hoLayer2
		Send Destroy to hoLayers1
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v3
		Variant vA2
			Variant voLayers2
			Get ComLayers to voLayers2
			Handle hoLayers2
			Get Create (RefClass(cComLayers)) to hoLayers2
			Set pvComObject of hoLayers2 to voLayers2
				Variant voLayer4
				Get ComItem of hoLayers2 "noDigit" to voLayer4
				Handle hoLayer4
				Get Create (RefClass(cComLayer)) to hoLayer4
				Set pvComObject of hoLayer4 to voLayer4
					Variant voLayer5
					Get ComItem of hoLayer4 "noDigit" to voLayer5
					Handle hoLayer5
					Get Create (RefClass(cComLayer)) to hoLayer5
					Set pvComObject of hoLayer5 to voLayer5
						Get ComValue of hoLayer5 to vA2
					Send Destroy to hoLayer5
				Send Destroy to hoLayer4
			Send Destroy to hoLayers2
		Get ComFormatABC "value + B" vA2 llDelta Nothing to v3
	Set ComValue to v3
End_Procedure

// Occurs when the interval elapses.
Procedure OnComTimer Integer   llTickCount
	Forward Send OnComTimer llTickCount
	Variant v4
		Variant vA3
			Get ComValue to vA3
		Get ComFormatABC "value = 99 ? 0 : ( value  + B )" vA3 1 Nothing to v4
	Set ComValue to v4
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 3
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer6
		Get ComItem of hoLayers4 1 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComKey of hoLayer6 to "noBack"
			Set ComLeft of hoLayer6 to "(width - 55 * 2)/2"
			Set ComTop of hoLayer6 to "(height - 94 * 1)/2"
			Set ComWidth of hoLayer6 to "2 * 45 + 8"
			Set ComHeight of hoLayer6 to "1 * 94"
			Set ComTransparency of hoLayer6 to 90
			Variant voBackground2
			Get ComBackground of hoLayer6 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComExtraPicture of hoBackground2 "80" to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "noBack.png"
					Set ComLeft of hoPicture2 to "-4"
					Set ComWidth of hoPicture2 to "70"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Variant voBackground3
			Get ComBackground of hoLayer6 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComExtraPicture of hoBackground3 "08" to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "noBack.png"
					Set ComLeft of hoPicture3 to "36"
					Set ComWidth of hoPicture3 to 70
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
		Send Destroy to hoLayer6
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer7
		Get ComItem of hoLayers5 2 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComKey of hoLayer7 to "noDigit"
			Set ComLeft of hoLayer7 to "(width - 55 * 2)/2"
			Set ComTop of hoLayer7 to "(height - 94 * 1)/2"
			Set ComWidth of hoLayer7 to "2 * 45 + 8"
			Set ComHeight of hoLayer7 to "1 * 94"
			Variant voBackground4
			Get ComBackground of hoLayer7 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voPicture4
				Get ComExtraPicture of hoBackground4 "80" to voPicture4
				Handle hoPicture4
				Get Create (RefClass(cComPicture)) to hoPicture4
				Set pvComObject of hoPicture4 to voPicture4
					Set ComName of hoPicture4 to "no1.png"
					Set ComLeft of hoPicture4 to "-4"
					Set ComWidth of hoPicture4 to "70"
				Send Destroy to hoPicture4
			Send Destroy to hoBackground4
			Variant voBackground5
			Get ComBackground of hoLayer7 to voBackground5
			Handle hoBackground5
			Get Create (RefClass(cComBackground)) to hoBackground5
			Set pvComObject of hoBackground5 to voBackground5
				Variant voPicture5
				Get ComExtraPicture of hoBackground5 "08" to voPicture5
				Handle hoPicture5
				Get Create (RefClass(cComPicture)) to hoPicture5
				Set pvComObject of hoPicture5 to voPicture5
					Set ComName of hoPicture5 to "no2.png"
					Set ComLeft of hoPicture5 to "36"
					Set ComWidth of hoPicture5 to 70
				Send Destroy to hoPicture5
			Send Destroy to hoBackground5
		Send Destroy to hoLayer7
	Send Destroy to hoLayers5
	Variant v5
		Variant voLayers6
		Get ComLayers to voLayers6
		Handle hoLayers6
		Get Create (RefClass(cComLayers)) to hoLayers6
		Set pvComObject of hoLayers6 to voLayers6
			Variant voLayer8
			Get ComItem of hoLayers6 "noDigit" to voLayer8
			Handle hoLayer8
			Get Create (RefClass(cComLayer)) to hoLayer8
			Set pvComObject of hoLayer8 to voLayer8
				Variant voLayer9
				Get ComItem of hoLayer8 "noDigit" to voLayer9
				Handle hoLayer9
				Get Create (RefClass(cComLayer)) to hoLayer9
				Set pvComObject of hoLayer9 to voLayer9
					Get ComIndex of hoLayer9 to v5
				Send Destroy to hoLayer9
			Send Destroy to hoLayer8
		Send Destroy to hoLayers6
	Set ComLayerOfValue to v5
	Set ComValue to 73
	Set ComTimerInterval to 100
	Send ComEndUpdate
End_Procedure
38:
How can I display a simple knob, to fit the control's client area

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Set ComLayerAutoSize to -1
	Set ComDefaultLayer OLEexDefLayerWidth to "width MAX height"
	Set ComDefaultLayer OLEexDefLayerHeight to "width MAX height"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 5
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 4 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComOnDrag of hoLayer to OLEexDoRotamove
			Set ComDefaultRotateAngle of hoLayer to -142
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
End_Procedure
37:
How can I display a switch

// Occurs when the user presses and then releases the left mouse button over the control.
Procedure OnComClick 
	Forward Send OnComClick 
	Variant v
		Get ComFormatABC "(value + 1) mod 2" (ComValue(Self)) Nothing Nothing to v
	Set ComValue to v
End_Procedure

// Occurs once the user ends dragging a layer.
Procedure OnComDragEnd Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragEnd llDragInfo llCancel
	Variant v1
		Variant vA
			Variant voLayers
			Get ComLayers to voLayers
			Handle hoLayers
			Get Create (RefClass(cComLayers)) to hoLayers
			Set pvComObject of hoLayers to voLayers
				Variant voLayer
				Get ComItem of hoLayers "knob" to voLayer
				Handle hoLayer
				Get Create (RefClass(cComLayer)) to hoLayer
				Set pvComObject of hoLayer to voLayer
					Variant voLayer1
					Get ComItem of hoLayer "knob" to voLayer1
					Handle hoLayer1
					Get Create (RefClass(cComLayer)) to hoLayer1
					Set pvComObject of hoLayer1 to voLayer1
						Get ComOffsetX of hoLayer1 to vA
					Send Destroy to hoLayer1
				Send Destroy to hoLayer
			Send Destroy to hoLayers
		Get ComFormatABC "(value < 24 ? 0 : 1)" vA Nothing Nothing to v1
	Set ComValue to v1
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v2
		Get ComFormatABC "value > 0 ? 1 : 0" llDelta Nothing Nothing to v2
	Set ComValue to v2
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch"
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Set ComCount of hoLayers1 to 4
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 0 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant voBackground
			Get ComBackground of hoLayer2 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "background.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 1 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Variant voBackground1
			Get ComBackground of hoLayer3 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Indicator_ON.png"
					Set ComDisplayAs of hoPicture1 to OLEMiddleLeft
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComOffsetXValid of hoLayer3 to 48
			Set ComOffsetYValid of hoLayer3 to 0
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 2 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground2
			Get ComBackground of hoLayer4 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "Indicator_OFF.png"
					Set ComDisplayAs of hoPicture2 to OLEMiddleRight
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Set ComOffsetXValid of hoLayer4 to -12
			Set ComOffsetYValid of hoLayer4 to 0
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer5
		Get ComItem of hoLayers5 3 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Set ComOnDrag of hoLayer5 to OLEexDoMove
			Set ComKey of hoLayer5 to "knob"
			Variant voBackground3
			Get ComBackground of hoLayer5 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "knob.png"
					Set ComDisplayAs of hoPicture3 to OLEMiddleCenter
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Set ComDefaultOffsetY of hoLayer5 to "9"
			Set ComDefaultOffsetX of hoLayer5 to "-5"
			Set ComOffsetYValid of hoLayer5 to "0"
			Set ComValueToOffsetX of hoLayer5 to "value = 0 ? 0 : 48"
			Set ComOffsetToValue of hoLayer5 to "value = 0 ? 0 : 1"
			Set ComOffsetXValid of hoLayer5 to "(value MIN 0 MAX 48)"
		Send Destroy to hoLayer5
	Send Destroy to hoLayers5
	Variant v3
		Variant voLayers6
		Get ComLayers to voLayers6
		Handle hoLayers6
		Get Create (RefClass(cComLayers)) to hoLayers6
		Set pvComObject of hoLayers6 to voLayers6
			Variant voLayer6
			Get ComItem of hoLayers6 "knob" to voLayer6
			Handle hoLayer6
			Get Create (RefClass(cComLayer)) to hoLayer6
			Set pvComObject of hoLayer6 to voLayer6
				Variant voLayer7
				Get ComItem of hoLayer6 "knob" to voLayer7
				Handle hoLayer7
				Get Create (RefClass(cComLayer)) to hoLayer7
				Set pvComObject of hoLayer7 to voLayer7
					Get ComIndex of hoLayer7 to v3
				Send Destroy to hoLayer7
			Send Destroy to hoLayer6
		Send Destroy to hoLayers6
	Set ComLayerOfValue to v3
	Set ComValue to 1
End_Procedure
36:
How can I colorize the layer

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 4 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (value format ``)",vA,Nothing,Nothing))
End_Procedure

// Occurs when the user presses and then releases the left mouse button over the control.
Procedure OnComClick 
	Forward Send OnComClick 
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
	Get ComItem of hoLayers1 (ComLayerFromPoint(hoLayers1,-1,-1)) to Nothing	Send Destroy to hoLayers1
End_Procedure

// Notifies that the cursor enters the layer.
Procedure OnComMouseIn Integer   llLayer
	Forward Send OnComMouseIn llLayer
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 llLayer to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComBrightness of hoLayer1 OLEexRedChannel to 100
			Set ComBrightness of hoLayer1 OLEexGreenChannel to 0
			Set ComBrightness of hoLayer1 OLEexBlueChannel to 0
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
End_Procedure

// Notifies that the cursor exits the layer.
Procedure OnComMouseOut Integer   llLayer
	Forward Send OnComMouseOut llLayer
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 llLayer to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant v
				Get ComDefaultLayer OLEexDefLayerBrightness to v
			Set ComBrightness of hoLayer2 OLEexRedChannel to v
			Variant v1
				Get ComDefaultLayer OLEexDefLayerBrightness to v1
			Set ComBrightness of hoLayer2 OLEexGreenChannel to v1
			Variant v2
				Get ComDefaultLayer OLEexDefLayerBrightness to v2
			Set ComBrightness of hoLayer2 OLEexBlueChannel to v2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v3
		Get ComFormatABC "A - B" (ComValue(Self)) llDelta Nothing to v3
	Set ComValue to v3
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComDefaultLayer OLEexDefLayerBrightness to 51
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Set ComCount of hoLayers4 to 6
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer3
		Get ComItem of hoLayers5 0 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComRotateCenterX of hoLayer3 to "lwidth/2-3"
			Set ComRotateCenterY of hoLayer3 to "lheight/2+23"
		Send Destroy to hoLayer3
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer4
		Get ComItem of hoLayers6 4 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComDefaultRotateAngle of hoLayer4 to -132
			Set ComOnDrag of hoLayer4 to OLEexDoRotamove
			Set ComRotateAngleValid of hoLayer4 to "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
			Set ComValueToRotateAngle of hoLayer4 to "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
			Set ComRotateAngleToValue of hoLayer4 to "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
		Send Destroy to hoLayer4
	Send Destroy to hoLayers6
	Set ComValue to 45
	Send ComEndUpdate
End_Procedure
35:
How can I imitate the rotating angle on an unequal scale

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 4 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (value format ``)",vA,Nothing,Nothing))
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v
		Get ComFormatABC "A - B" (ComValue(Self)) llDelta Nothing to v
	Set ComValue to v
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Set ComCount of hoLayers1 to 6
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComRotateCenterX of hoLayer1 to "lwidth/2-3"
			Set ComRotateCenterY of hoLayer1 to "lheight/2+23"
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 4 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComDefaultRotateAngle of hoLayer2 to -132
			Set ComOnDrag of hoLayer2 to OLEexDoRotamove
			Set ComRotateAngleValid of hoLayer2 to "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
			Set ComValueToRotateAngle of hoLayer2 to "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
			Set ComRotateAngleToValue of hoLayer2 to "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Set ComValue to 45
	Send ComEndUpdate
End_Procedure
34:
How can I rotate more knobs at once

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 4 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (value format ``)",vA,Nothing,Nothing))
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 2 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v
				Variant voLayers2
				Get ComLayers to voLayers2
				Handle hoLayers2
				Get Create (RefClass(cComLayers)) to hoLayers2
				Set pvComObject of hoLayers2 to voLayers2
					Variant voLayer2
					Get ComItem of hoLayers2 4 to voLayer2
					Handle hoLayer2
					Get Create (RefClass(cComLayer)) to hoLayer2
					Set pvComObject of hoLayer2 to voLayer2
						Variant voLayer3
						Get ComItem of hoLayer2 4 to voLayer3
						Handle hoLayer3
						Get Create (RefClass(cComLayer)) to hoLayer3
						Set pvComObject of hoLayer3 to voLayer3
							Get ComRotateAngle of hoLayer3 to v
						Send Destroy to hoLayer3
					Send Destroy to hoLayer2
				Send Destroy to hoLayers2
			Set ComRotateAngle of hoLayer1 to v
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
		Variant voLayers3
		Get ComLayers to voLayers3
		Handle hoLayers3
		Get Create (RefClass(cComLayers)) to hoLayers3
		Set pvComObject of hoLayers3 to voLayers3
			Variant voLayer4
			Get ComItem of hoLayers3 4 to voLayer4
			Handle hoLayer4
			Get Create (RefClass(cComLayer)) to hoLayer4
			Set pvComObject of hoLayer4 to voLayer4
				Variant voLayer5
				Get ComItem of hoLayer4 4 to voLayer5
				Handle hoLayer5
				Get Create (RefClass(cComLayer)) to hoLayer5
				Set pvComObject of hoLayer5 to voLayer5
					Variant v1
						Variant vA1
							Variant voLayers4
							Get ComLayers to voLayers4
							Handle hoLayers4
							Get Create (RefClass(cComLayers)) to hoLayers4
							Set pvComObject of hoLayers4 to voLayers4
								Variant voLayer6
								Get ComItem of hoLayers4 4 to voLayer6
								Handle hoLayer6
								Get Create (RefClass(cComLayer)) to hoLayer6
								Set pvComObject of hoLayer6 to voLayer6
									Variant voLayer7
									Get ComItem of hoLayer6 4 to voLayer7
									Handle hoLayer7
									Get Create (RefClass(cComLayer)) to hoLayer7
									Set pvComObject of hoLayer7 to voLayer7
										Get ComRotateAngle of hoLayer7 to vA1
									Send Destroy to hoLayer7
								Send Destroy to hoLayer6
							Send Destroy to hoLayers4
						Get ComFormatABC "A - B" vA1 llDelta Nothing to v1
					Set ComRotateAngle of hoLayer5 to v1
				Send Destroy to hoLayer5
			Send Destroy to hoLayer4
		Send Destroy to hoLayers3
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Set ComCount of hoLayers5 to 5
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer8
		Get ComItem of hoLayers6 4 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComOnDrag of hoLayer8 to OLEexDoRotamove
			Set ComDefaultRotateAngle of hoLayer8 to -142
		Send Destroy to hoLayer8
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer9
		Get ComItem of hoLayers7 2 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Set ComOnDrag of hoLayer9 to OLEexDoRotate
			Set ComRotateType of hoLayer9 to OLEexRotateBilinearInterpolation
		Send Destroy to hoLayer9
	Send Destroy to hoLayers7
End_Procedure
33:
How can I clip one layer while other is rotating

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 9 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (value format ``)",vA,Nothing,Nothing))
	Variant vA1
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 9 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Get ComRotateAngle of hoLayer1 to vA1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Set ComExtraCaption "RotateAngle" OLEexLayerCaption to (ComFormatABC(Self,"` RotateAngle: <b>` + ( A format `` ) + ``",vA1,Nothing,Nothing))
	Set ComExtraCaption "RotateAngle" OLEexLayerCaptionTop to 18
	Variant vA2
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 9 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Get ComRotamoveCenterX of hoLayer2 to vA2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
	Variant vB
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 9 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Get ComRotamoveCenterY of hoLayer3 to vB
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveCenter: <b> (` + A + `,` + B + `)`",vA2,vB,Nothing))
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaptionTop to 36
	Variant vA3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 9 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Get ComRotamoveOffsetX of hoLayer4 to vA3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
	Variant vB1
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer5
		Get ComItem of hoLayers5 9 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Get ComRotamoveOffsetY of hoLayer5 to vB1
		Send Destroy to hoLayer5
	Send Destroy to hoLayers5
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveOffset: <b> (` + A + `,` + B + `)`",vA3,vB1,Nothing))
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaptionTop to 54
	Variant vA4
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer6
		Get ComItem of hoLayers6 9 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Get ComOffsetX of hoLayer6 to vA4
		Send Destroy to hoLayer6
	Send Destroy to hoLayers6
	Variant vB2
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer7
		Get ComItem of hoLayers7 9 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Get ComOffsetY of hoLayer7 to vB2
		Send Destroy to hoLayer7
	Send Destroy to hoLayers7
	Set ComExtraCaption "Offset" OLEexLayerCaption to (ComFormatABC(Self,"` Offset: <b> (` + A + `,` + B + `)`",vA4,vB2,Nothing))
	Set ComExtraCaption "Offset" OLEexLayerCaptionTop to 72
	Variant vA5
		Get ComValue to vA5
	Set ComExtraCaption "Client" OLEexLayerCaption to (ComFormatABC(Self,"`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",vA5,Nothing,Nothing))
	Variant vA6
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer8
		Get ComItem of hoLayers8 9 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Get ComLayerToClientX of hoLayer8 (ComRotamoveCenterX(hoLayer8)) (ComRotamoveCenterY(hoLayer8)) to vA6
		Send Destroy to hoLayer8
	Send Destroy to hoLayers8
	Set ComExtraCaption "Client" OLEexLayerCaptionLeft to (ComFormatABC(Self,"value - 12",vA6,Nothing,Nothing))
	Variant vA7
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer9
		Get ComItem of hoLayers9 9 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Get ComLayerToClientY of hoLayer9 (ComRotamoveCenterX(hoLayer9)) (ComRotamoveCenterY(hoLayer9)) to vA7
		Send Destroy to hoLayer9
	Send Destroy to hoLayers9
	Set ComExtraCaption "Client" OLEexLayerCaptionTop to (ComFormatABC(Self,"value - 36",vA7,Nothing,Nothing))
	Variant voLayers10
	Get ComLayers to voLayers10
	Handle hoLayers10
	Get Create (RefClass(cComLayers)) to hoLayers10
	Set pvComObject of hoLayers10 to voLayers10
		Variant voLayer10
		Get ComItem of hoLayers10 3 to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Variant voClip
			Get ComClip of hoLayer10 to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v
					Variant voLayers11
					Get ComLayers to voLayers11
					Handle hoLayers11
					Get Create (RefClass(cComLayers)) to hoLayers11
					Set pvComObject of hoLayers11 to voLayers11
						Variant voLayer11
						Get ComItem of hoLayers11 9 to voLayer11
						Handle hoLayer11
						Get Create (RefClass(cComLayer)) to hoLayer11
						Set pvComObject of hoLayer11 to voLayer11
							Variant voLayer12
							Get ComItem of hoLayer11 9 to voLayer12
							Handle hoLayer12
							Get Create (RefClass(cComLayer)) to hoLayer12
							Set pvComObject of hoLayer12 to voLayer12
								Get ComRotateAngle of hoLayer12 to v
							Send Destroy to hoLayer12
						Send Destroy to hoLayer11
					Send Destroy to hoLayers11
				Set ComValue of hoClip to v
			Send Destroy to hoClip
		Send Destroy to hoLayer10
	Send Destroy to hoLayers10
	Variant voLayers12
	Get ComLayers to voLayers12
	Handle hoLayers12
	Get Create (RefClass(cComLayers)) to hoLayers12
	Set pvComObject of hoLayers12 to voLayers12
		Variant voLayer13
		Get ComItem of hoLayers12 4 to voLayer13
		Handle hoLayer13
		Get Create (RefClass(cComLayer)) to hoLayer13
		Set pvComObject of hoLayer13 to voLayer13
			Variant voClip1
			Get ComClip of hoLayer13 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant voLayers13
					Get ComLayers to voLayers13
					Handle hoLayers13
					Get Create (RefClass(cComLayers)) to hoLayers13
					Set pvComObject of hoLayers13 to voLayers13
						Variant voLayer14
						Get ComItem of hoLayers13 3 to voLayer14
						Handle hoLayer14
						Get Create (RefClass(cComLayer)) to hoLayer14
						Set pvComObject of hoLayer14 to voLayer14
							Variant voLayer15
							Get ComItem of hoLayer14 3 to voLayer15
							Handle hoLayer15
							Get Create (RefClass(cComLayer)) to hoLayer15
							Set pvComObject of hoLayer15 to voLayer15
								Variant voClip2
								Get ComClip of hoLayer15 to voClip2
								Handle hoClip2
								Get Create (RefClass(cComClip)) to hoClip2
								Set pvComObject of hoClip2 to voClip2
									Get ComValue of hoClip2 to v1
								Send Destroy to hoClip2
							Send Destroy to hoLayer15
						Send Destroy to hoLayer14
					Send Destroy to hoLayers13
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer13
	Send Destroy to hoLayers12
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Set ComValue to (ComFormatABC(Self,"100 - value - B",(ComValue(Self)),llDelta,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers14
	Get ComLayers to voLayers14
	Handle hoLayers14
	Get Create (RefClass(cComLayers)) to hoLayers14
	Set pvComObject of hoLayers14 to voLayers14
		Set ComCount of hoLayers14 to 11
	Send Destroy to hoLayers14
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers15
	Get ComLayers to voLayers15
	Handle hoLayers15
	Get Create (RefClass(cComLayers)) to hoLayers15
	Set pvComObject of hoLayers15 to voLayers15
		Variant voLayer16
		Get ComItem of hoLayers15 9 to voLayer16
		Handle hoLayer16
		Get Create (RefClass(cComLayer)) to hoLayer16
		Set pvComObject of hoLayer16 to voLayer16
			Set ComDefaultRotateAngle of hoLayer16 to -126
			Set ComOnDrag of hoLayer16 to OLEexDoRotamove
			Set ComRotateAngleToValue of hoLayer16 to "100 - value / 360 * 100"
			Set ComValueToRotateAngle of hoLayer16 to "(value)/100 * 360"
		Send Destroy to hoLayer16
	Send Destroy to hoLayers15
	Variant voLayers16
	Get ComLayers to voLayers16
	Handle hoLayers16
	Get Create (RefClass(cComLayers)) to hoLayers16
	Set pvComObject of hoLayers16 to voLayers16
		Variant voLayer17
		Get ComItem of hoLayers16 3 to voLayer17
		Handle hoLayer17
		Get Create (RefClass(cComLayer)) to hoLayer17
		Set pvComObject of hoLayer17 to voLayer17
			Variant voClip3
			Get ComClip of hoLayer17 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipPie
				Get ComPie of hoClip3 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComSweepAngle of hoClipPie to "value"
				Send Destroy to hoClipPie
			Send Destroy to hoClip3
		Send Destroy to hoLayer17
	Send Destroy to hoLayers16
	Variant voLayers17
	Get ComLayers to voLayers17
	Handle hoLayers17
	Get Create (RefClass(cComLayers)) to hoLayers17
	Set pvComObject of hoLayers17 to voLayers17
		Variant voLayer18
		Get ComItem of hoLayers17 4 to voLayer18
		Handle hoLayer18
		Get Create (RefClass(cComLayer)) to hoLayer18
		Set pvComObject of hoLayer18 to voLayer18
			Variant voClip4
			Get ComClip of hoLayer18 to voClip4
			Handle hoClip4
			Get Create (RefClass(cComClip)) to hoClip4
			Set pvComObject of hoClip4 to voClip4
				Variant voClipPie1
				Get ComPie of hoClip4 to voClipPie1
				Handle hoClipPie1
				Get Create (RefClass(cComClipPie)) to hoClipPie1
				Set pvComObject of hoClipPie1 to voClipPie1
					Variant v2
						Variant voLayers18
						Get ComLayers to voLayers18
						Handle hoLayers18
						Get Create (RefClass(cComLayers)) to hoLayers18
						Set pvComObject of hoLayers18 to voLayers18
							Variant voLayer19
							Get ComItem of hoLayers18 3 to voLayer19
							Handle hoLayer19
							Get Create (RefClass(cComLayer)) to hoLayer19
							Set pvComObject of hoLayer19 to voLayer19
								Variant voLayer20
								Get ComItem of hoLayer19 3 to voLayer20
								Handle hoLayer20
								Get Create (RefClass(cComLayer)) to hoLayer20
								Set pvComObject of hoLayer20 to voLayer20
									Variant voClip5
									Get ComClip of hoLayer20 to voClip5
									Handle hoClip5
									Get Create (RefClass(cComClip)) to hoClip5
									Set pvComObject of hoClip5 to voClip5
										Variant voClipPie2
										Get ComPie of hoClip5 to voClipPie2
										Handle hoClipPie2
										Get Create (RefClass(cComClipPie)) to hoClipPie2
										Set pvComObject of hoClipPie2 to voClipPie2
											Get ComSweepAngle of hoClipPie2 to v2
										Send Destroy to hoClipPie2
									Send Destroy to hoClip5
								Send Destroy to hoLayer20
							Send Destroy to hoLayer19
						Send Destroy to hoLayers18
					Set ComSweepAngle of hoClipPie1 to v2
				Send Destroy to hoClipPie1
			Send Destroy to hoClip4
		Send Destroy to hoLayer18
	Send Destroy to hoLayers17
	Variant voLayers19
	Get ComLayers to voLayers19
	Handle hoLayers19
	Get Create (RefClass(cComLayers)) to hoLayers19
	Set pvComObject of hoLayers19 to voLayers19
		Variant voLayer21
		Get ComItem of hoLayers19 9 to voLayer21
		Handle hoLayer21
		Get Create (RefClass(cComLayer)) to hoLayer21
		Set pvComObject of hoLayer21 to voLayer21
			Set ComValue of hoLayer21 to 25
		Send Destroy to hoLayer21
	Send Destroy to hoLayers19
	Send ComEndUpdate
End_Procedure
32:
Can I move one or more layers at once

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 3 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Variant vA
					Get ComValue to vA
				Get ComFormatABC "100 - value " vA Nothing Nothing to v
			Set ComBrightness of hoLayer OLEexRedChannel to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 4 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Variant voLayers2
				Get ComLayers to voLayers2
				Handle hoLayers2
				Get Create (RefClass(cComLayers)) to hoLayers2
				Set pvComObject of hoLayers2 to voLayers2
					Variant voLayer2
					Get ComItem of hoLayers2 3 to voLayer2
					Handle hoLayer2
					Get Create (RefClass(cComLayer)) to hoLayer2
					Set pvComObject of hoLayer2 to voLayer2
						Variant voLayer3
						Get ComItem of hoLayer2 3 to voLayer3
						Handle hoLayer3
						Get Create (RefClass(cComLayer)) to hoLayer3
						Set pvComObject of hoLayer3 to voLayer3
							Get ComBrightness of hoLayer3 OLEexRedChannel to v1
						Send Destroy to hoLayer3
					Send Destroy to hoLayer2
				Send Destroy to hoLayers2
			Set ComBrightness of hoLayer1 OLEexRedChannel to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant vA1
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer4
		Get ComItem of hoLayers3 9 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Get ComValue of hoLayer4 to vA1
		Send Destroy to hoLayer4
	Send Destroy to hoLayers3
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (100 - value format ``)",vA1,Nothing,Nothing))
	Variant vA2
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer5
		Get ComItem of hoLayers4 9 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Get ComRotateAngle of hoLayer5 to vA2
		Send Destroy to hoLayer5
	Send Destroy to hoLayers4
	Set ComExtraCaption "RotateAngle" OLEexLayerCaption to (ComFormatABC(Self,"` RotateAngle: <b>` + ( A format `` ) + ``",vA2,Nothing,Nothing))
	Set ComExtraCaption "RotateAngle" OLEexLayerCaptionTop to 18
	Variant vA3
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer6
		Get ComItem of hoLayers5 9 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Get ComRotamoveCenterX of hoLayer6 to vA3
		Send Destroy to hoLayer6
	Send Destroy to hoLayers5
	Variant vB
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer7
		Get ComItem of hoLayers6 9 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Get ComRotamoveCenterY of hoLayer7 to vB
		Send Destroy to hoLayer7
	Send Destroy to hoLayers6
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveCenter: <b> (` + A + `,` + B + `)`",vA3,vB,Nothing))
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaptionTop to 36
	Variant vA4
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer8
		Get ComItem of hoLayers7 9 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Get ComRotamoveOffsetX of hoLayer8 to vA4
		Send Destroy to hoLayer8
	Send Destroy to hoLayers7
	Variant vB1
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer9
		Get ComItem of hoLayers8 9 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Get ComRotamoveOffsetY of hoLayer9 to vB1
		Send Destroy to hoLayer9
	Send Destroy to hoLayers8
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveOffset: <b> (` + A + `,` + B + `)`",vA4,vB1,Nothing))
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaptionTop to 54
	Variant vA5
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer10
		Get ComItem of hoLayers9 9 to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Get ComOffsetX of hoLayer10 to vA5
		Send Destroy to hoLayer10
	Send Destroy to hoLayers9
	Variant vB2
	Variant voLayers10
	Get ComLayers to voLayers10
	Handle hoLayers10
	Get Create (RefClass(cComLayers)) to hoLayers10
	Set pvComObject of hoLayers10 to voLayers10
		Variant voLayer11
		Get ComItem of hoLayers10 9 to voLayer11
		Handle hoLayer11
		Get Create (RefClass(cComLayer)) to hoLayer11
		Set pvComObject of hoLayer11 to voLayer11
			Get ComOffsetY of hoLayer11 to vB2
		Send Destroy to hoLayer11
	Send Destroy to hoLayers10
	Set ComExtraCaption "Offset" OLEexLayerCaption to (ComFormatABC(Self,"` Offset: <b> (` + A + `,` + B + `)`",vA5,vB2,Nothing))
	Set ComExtraCaption "Offset" OLEexLayerCaptionTop to 72
	Variant voLayers11
	Get ComLayers to voLayers11
	Handle hoLayers11
	Get Create (RefClass(cComLayers)) to hoLayers11
	Set pvComObject of hoLayers11 to voLayers11
		Variant voLayer12
		Get ComItem of hoLayers11 10 to voLayer12
		Handle hoLayer12
		Get Create (RefClass(cComLayer)) to hoLayer12
		Set pvComObject of hoLayer12 to voLayer12
			Variant v2
				Variant voLayers12
				Get ComLayers to voLayers12
				Handle hoLayers12
				Get Create (RefClass(cComLayers)) to hoLayers12
				Set pvComObject of hoLayers12 to voLayers12
					Variant voLayer13
					Get ComItem of hoLayers12 9 to voLayer13
					Handle hoLayer13
					Get Create (RefClass(cComLayer)) to hoLayer13
					Set pvComObject of hoLayer13 to voLayer13
						Variant voLayer14
						Get ComItem of hoLayer13 9 to voLayer14
						Handle hoLayer14
						Get Create (RefClass(cComLayer)) to hoLayer14
						Set pvComObject of hoLayer14 to voLayer14
							Get ComRotateAngle of hoLayer14 to v2
						Send Destroy to hoLayer14
					Send Destroy to hoLayer13
				Send Destroy to hoLayers12
			Set ComRotateAngle of hoLayer12 to v2
		Send Destroy to hoLayer12
	Send Destroy to hoLayers11
End_Procedure

// Occurs when the user dblclk the left mouse button over an object.
Procedure OnComDblClick Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComDblClick llShift llX llY
	Set ComValue to 0
End_Procedure

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise )
	// ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `` ", DragInfo.CumulativeRotateAngle )
	Showln llDragInfo
	Set ComExtraCaption "Clockwise" OLEexLayerCaptionTop to 90
	Set ComExtraCaption "Cumulative" OLEexLayerCaptionTop to 108
End_Procedure

// Occurs once the user ends dragging a layer.
Procedure OnComDragEnd Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragEnd llDragInfo llCancel
	Set ComExtraCaption "Clockwise" OLEexLayerCaption to ""
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug  = 227
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
	Set ComExtraCaption "Clockwise" OLEexLayerCaption to ""
	Set ComExtraCaption "Cumulative" OLEexLayerCaption to ""
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant vA6
		Get ComValue to vA6
	Set ComValue to (ComFormatABC(Self,"100 - A - B",vA6,llDelta,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers13
	Get ComLayers to voLayers13
	Handle hoLayers13
	Get Create (RefClass(cComLayers)) to hoLayers13
	Set pvComObject of hoLayers13 to voLayers13
		Set ComCount of hoLayers13 to 11
	Send Destroy to hoLayers13
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers14
	Get ComLayers to voLayers14
	Handle hoLayers14
	Get Create (RefClass(cComLayers)) to hoLayers14
	Set pvComObject of hoLayers14 to voLayers14
		Variant voLayer15
		Get ComItem of hoLayers14 9 to voLayer15
		Handle hoLayer15
		Get Create (RefClass(cComLayer)) to hoLayer15
		Set pvComObject of hoLayer15 to voLayer15
			Set ComOnDrag of hoLayer15 to OLEexDoRotamove
			Set ComDefaultRotateAngle of hoLayer15 to -126
			Set ComRotateAngleToValue of hoLayer15 to "100 - (value ) / 360 * 100"
			Set ComValueToRotateAngle of hoLayer15 to "(value)/100 * 360"
		Send Destroy to hoLayer15
	Send Destroy to hoLayers14
	Variant voLayers15
	Get ComLayers to voLayers15
	Handle hoLayers15
	Get Create (RefClass(cComLayers)) to hoLayers15
	Set pvComObject of hoLayers15 to voLayers15
		Variant voLayer16
		Get ComItem of hoLayers15 10 to voLayer16
		Handle hoLayer16
		Get Create (RefClass(cComLayer)) to hoLayer16
		Set pvComObject of hoLayer16 to voLayer16
			Set ComGrayscale of hoLayer16 to True
			Set ComTransparency of hoLayer16 to 25
			Set ComDefaultRotateAngle of hoLayer16 to -69.5
			Set ComRotateAngleToValue of hoLayer16 to "100 - (value ) / 360 * 100"
			Set ComValueToRotateAngle of hoLayer16 to "(value 1)/100 * 360"
			Variant voBackground
			Get ComBackground of hoLayer16 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "Highlighted_Layer4.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer16
	Send Destroy to hoLayers15
	Variant voLayers16
	Get ComLayers to voLayers16
	Handle hoLayers16
	Get Create (RefClass(cComLayers)) to hoLayers16
	Set pvComObject of hoLayers16 to voLayers16
		Variant voLayer17
		Get ComItem of hoLayers16 3 to voLayer17
		Handle hoLayer17
		Get Create (RefClass(cComLayer)) to hoLayer17
		Set pvComObject of hoLayer17 to voLayer17
			Set ComBrightness of hoLayer17 OLEexAllChannels to 0
			Set ComBrightness of hoLayer17 OLEexRedChannel to 0
		Send Destroy to hoLayer17
	Send Destroy to hoLayers16
	Variant voLayers17
	Get ComLayers to voLayers17
	Handle hoLayers17
	Get Create (RefClass(cComLayers)) to hoLayers17
	Set pvComObject of hoLayers17 to voLayers17
		Variant voLayer18
		Get ComItem of hoLayers17 4 to voLayer18
		Handle hoLayer18
		Get Create (RefClass(cComLayer)) to hoLayer18
		Set pvComObject of hoLayer18 to voLayer18
			Set ComBrightness of hoLayer18 OLEexAllChannels to 0
			Set ComBrightness of hoLayer18 OLEexRedChannel to 0
		Send Destroy to hoLayer18
	Send Destroy to hoLayers17
	Set ComLayerOfValue to 9
	Set ComValue to 5
	Send ComEndUpdate
End_Procedure
31:
How can I rotate a knob by moving ( rotamove )

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 3 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComTransparency of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 4 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Get ComValue to v1
			Set ComTransparency of hoLayer1 to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant vA
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 9 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Get ComValue of hoLayer2 to vA
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (100 - value format ``)",vA,Nothing,Nothing))
	Variant vA1
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 9 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Get ComRotateAngle of hoLayer3 to vA1
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
	Set ComExtraCaption "RotateAngle" OLEexLayerCaption to (ComFormatABC(Self,"` RotateAngle: <b>` + ( A format `` ) + ``",vA1,Nothing,Nothing))
	Set ComExtraCaption "RotateAngle" OLEexLayerCaptionTop to 18
	Variant vA2
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 9 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Get ComRotamoveCenterX of hoLayer4 to vA2
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
	Variant vB
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer5
		Get ComItem of hoLayers5 9 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Get ComRotamoveCenterY of hoLayer5 to vB
		Send Destroy to hoLayer5
	Send Destroy to hoLayers5
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveCenter: <b> (` + A + `,` + B + `)`",vA2,vB,Nothing))
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaptionTop to 36
	Variant vA3
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer6
		Get ComItem of hoLayers6 9 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Get ComRotamoveOffsetX of hoLayer6 to vA3
		Send Destroy to hoLayer6
	Send Destroy to hoLayers6
	Variant vB1
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer7
		Get ComItem of hoLayers7 9 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Get ComRotamoveOffsetY of hoLayer7 to vB1
		Send Destroy to hoLayer7
	Send Destroy to hoLayers7
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveOffset: <b> (` + A + `,` + B + `)`",vA3,vB1,Nothing))
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaptionTop to 54
	Variant vA4
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer8
		Get ComItem of hoLayers8 9 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Get ComOffsetX of hoLayer8 to vA4
		Send Destroy to hoLayer8
	Send Destroy to hoLayers8
	Variant vB2
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer9
		Get ComItem of hoLayers9 9 to voLayer9
		Handle hoLayer9
		Get Create (RefClass(cComLayer)) to hoLayer9
		Set pvComObject of hoLayer9 to voLayer9
			Get ComOffsetY of hoLayer9 to vB2
		Send Destroy to hoLayer9
	Send Destroy to hoLayers9
	Set ComExtraCaption "Offset" OLEexLayerCaption to (ComFormatABC(Self,"` Offset: <b> (` + A + `,` + B + `)`",vA4,vB2,Nothing))
	Set ComExtraCaption "Offset" OLEexLayerCaptionTop to 72
End_Procedure

// Occurs when the user dblclk the left mouse button over an object.
Procedure OnComDblClick Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComDblClick llShift llX llY
	Set ComValue to 0
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant vA5
		Get ComValue to vA5
	Set ComValue to (ComFormatABC(Self,"100 - A - B",vA5,llDelta,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers10
	Get ComLayers to voLayers10
	Handle hoLayers10
	Get Create (RefClass(cComLayers)) to hoLayers10
	Set pvComObject of hoLayers10 to voLayers10
		Set ComCount of hoLayers10 to 11
	Send Destroy to hoLayers10
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers11
	Get ComLayers to voLayers11
	Handle hoLayers11
	Get Create (RefClass(cComLayers)) to hoLayers11
	Set pvComObject of hoLayers11 to voLayers11
		Variant voLayer10
		Get ComItem of hoLayers11 9 to voLayer10
		Handle hoLayer10
		Get Create (RefClass(cComLayer)) to hoLayer10
		Set pvComObject of hoLayer10 to voLayer10
			Set ComOnDrag of hoLayer10 to OLEexDoRotamove
			Set ComDefaultRotateAngle of hoLayer10 to -126
			Set ComRotateAngleToValue of hoLayer10 to "100 - value / 360 * 100"
			Set ComValueToRotateAngle of hoLayer10 to "(value)/100 * 360"
			Variant voBackground
			Get ComBackground of hoLayer10 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComExtraPicture of hoBackground "Aka" to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "Highlighted_Layer4.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer10
	Send Destroy to hoLayers11
	Variant voLayers12
	Get ComLayers to voLayers12
	Handle hoLayers12
	Get Create (RefClass(cComLayers)) to hoLayers12
	Set pvComObject of hoLayers12 to voLayers12
		Variant voLayer11
		Get ComItem of hoLayers12 3 to voLayer11
		Handle hoLayer11
		Get Create (RefClass(cComLayer)) to hoLayer11
		Set pvComObject of hoLayer11 to voLayer11
			Set ComBrightness of hoLayer11 OLEexAllChannels to 0
			Set ComBrightness of hoLayer11 OLEexRedChannel to 100
		Send Destroy to hoLayer11
	Send Destroy to hoLayers12
	Variant voLayers13
	Get ComLayers to voLayers13
	Handle hoLayers13
	Get Create (RefClass(cComLayers)) to hoLayers13
	Set pvComObject of hoLayers13 to voLayers13
		Variant voLayer12
		Get ComItem of hoLayers13 4 to voLayer12
		Handle hoLayer12
		Get Create (RefClass(cComLayer)) to hoLayer12
		Set pvComObject of hoLayer12 to voLayer12
			Set ComOnDrag of hoLayer12 to OLEexDoRotamove
			Set ComBrightness of hoLayer12 OLEexAllChannels to 0
			Set ComBrightness of hoLayer12 OLEexRedChannel to 100
		Send Destroy to hoLayer12
	Send Destroy to hoLayers13
	Set ComValue to 15
	Send ComEndUpdate
End_Procedure
30:
How can I display a knob, and displays the current value on it

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 9 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"` Value: <b>` + (100 - value format ``)",vA,Nothing,Nothing))
	Variant vA1
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 9 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Get ComRotateAngle of hoLayer1 to vA1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Set ComExtraCaption "RotateAngle" OLEexLayerCaption to (ComFormatABC(Self,"` RotateAngle: <b>` + ( A format `` ) + ``",vA1,Nothing,Nothing))
	Set ComExtraCaption "RotateAngle" OLEexLayerCaptionTop to 18
	Variant vA2
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 9 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Get ComRotamoveCenterX of hoLayer2 to vA2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
	Variant vB
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 9 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Get ComRotamoveCenterY of hoLayer3 to vB
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveCenter: <b> (` + A + `,` + B + `)`",vA2,vB,Nothing))
	Set ComExtraCaption "RotamoveCenter" OLEexLayerCaptionTop to 36
	Variant vA3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 9 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Get ComRotamoveOffsetX of hoLayer4 to vA3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
	Variant vB1
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer5
		Get ComItem of hoLayers5 9 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Get ComRotamoveOffsetY of hoLayer5 to vB1
		Send Destroy to hoLayer5
	Send Destroy to hoLayers5
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaption to (ComFormatABC(Self,"` RotamoveOffset: <b> (` + A + `,` + B + `)`",vA3,vB1,Nothing))
	Set ComExtraCaption "RotamoveOffset" OLEexLayerCaptionTop to 54
	Variant vA4
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer6
		Get ComItem of hoLayers6 9 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Get ComOffsetX of hoLayer6 to vA4
		Send Destroy to hoLayer6
	Send Destroy to hoLayers6
	Variant vB2
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer7
		Get ComItem of hoLayers7 9 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Get ComOffsetY of hoLayer7 to vB2
		Send Destroy to hoLayer7
	Send Destroy to hoLayers7
	Set ComExtraCaption "Offset" OLEexLayerCaption to (ComFormatABC(Self,"` Offset: <b> (` + A + `,` + B + `)`",vA4,vB2,Nothing))
	Set ComExtraCaption "Offset" OLEexLayerCaptionTop to 72
	Variant vA5
		Get ComValue to vA5
	Set ComExtraCaption "Client" OLEexLayerCaption to (ComFormatABC(Self,"`<sha ;;0><font ;12><b>` + (100 - value format `0`)",vA5,Nothing,Nothing))
	Variant vA6
		Variant voLayers8
		Get ComLayers to voLayers8
		Handle hoLayers8
		Get Create (RefClass(cComLayers)) to hoLayers8
		Set pvComObject of hoLayers8 to voLayers8
			Variant voLayer8
			Get ComItem of hoLayers8 9 to voLayer8
			Handle hoLayer8
			Get Create (RefClass(cComLayer)) to hoLayer8
			Set pvComObject of hoLayer8 to voLayer8
				Variant voLayer9
				Get ComItem of hoLayer8 9 to voLayer9
				Handle hoLayer9
				Get Create (RefClass(cComLayer)) to hoLayer9
				Set pvComObject of hoLayer9 to voLayer9
					Variant vX
						Variant voLayers9
						Get ComLayers to voLayers9
						Handle hoLayers9
						Get Create (RefClass(cComLayers)) to hoLayers9
						Set pvComObject of hoLayers9 to voLayers9
							Variant voLayer10
							Get ComItem of hoLayers9 9 to voLayer10
							Handle hoLayer10
							Get Create (RefClass(cComLayer)) to hoLayer10
							Set pvComObject of hoLayer10 to voLayer10
								Variant voLayer11
								Get ComItem of hoLayer10 9 to voLayer11
								Handle hoLayer11
								Get Create (RefClass(cComLayer)) to hoLayer11
								Set pvComObject of hoLayer11 to voLayer11
									Get ComRotamoveCenterX of hoLayer11 to vX
								Send Destroy to hoLayer11
							Send Destroy to hoLayer10
						Send Destroy to hoLayers9
	Variant vY
						Variant voLayers10
						Get ComLayers to voLayers10
						Handle hoLayers10
						Get Create (RefClass(cComLayers)) to hoLayers10
						Set pvComObject of hoLayers10 to voLayers10
							Variant voLayer12
							Get ComItem of hoLayers10 9 to voLayer12
							Handle hoLayer12
							Get Create (RefClass(cComLayer)) to hoLayer12
							Set pvComObject of hoLayer12 to voLayer12
								Variant voLayer13
								Get ComItem of hoLayer12 9 to voLayer13
								Handle hoLayer13
								Get Create (RefClass(cComLayer)) to hoLayer13
								Set pvComObject of hoLayer13 to voLayer13
									Get ComRotamoveCenterY of hoLayer13 to vY
								Send Destroy to hoLayer13
							Send Destroy to hoLayer12
						Send Destroy to hoLayers10
					Get ComLayerToClientX of hoLayer9 vX vY to vA6
				Send Destroy to hoLayer9
			Send Destroy to hoLayer8
		Send Destroy to hoLayers8
	Set ComExtraCaption "Client" OLEexLayerCaptionLeft to (ComFormatABC(Self,"value - 8",vA6,Nothing,Nothing))
	Variant vA7
		Variant voLayers11
		Get ComLayers to voLayers11
		Handle hoLayers11
		Get Create (RefClass(cComLayers)) to hoLayers11
		Set pvComObject of hoLayers11 to voLayers11
			Variant voLayer14
			Get ComItem of hoLayers11 9 to voLayer14
			Handle hoLayer14
			Get Create (RefClass(cComLayer)) to hoLayer14
			Set pvComObject of hoLayer14 to voLayer14
				Variant voLayer15
				Get ComItem of hoLayer14 9 to voLayer15
				Handle hoLayer15
				Get Create (RefClass(cComLayer)) to hoLayer15
				Set pvComObject of hoLayer15 to voLayer15
					Variant vX1
						Variant voLayers12
						Get ComLayers to voLayers12
						Handle hoLayers12
						Get Create (RefClass(cComLayers)) to hoLayers12
						Set pvComObject of hoLayers12 to voLayers12
							Variant voLayer16
							Get ComItem of hoLayers12 9 to voLayer16
							Handle hoLayer16
							Get Create (RefClass(cComLayer)) to hoLayer16
							Set pvComObject of hoLayer16 to voLayer16
								Variant voLayer17
								Get ComItem of hoLayer16 9 to voLayer17
								Handle hoLayer17
								Get Create (RefClass(cComLayer)) to hoLayer17
								Set pvComObject of hoLayer17 to voLayer17
									Get ComRotamoveCenterX of hoLayer17 to vX1
								Send Destroy to hoLayer17
							Send Destroy to hoLayer16
						Send Destroy to hoLayers12
	Variant vY1
						Variant voLayers13
						Get ComLayers to voLayers13
						Handle hoLayers13
						Get Create (RefClass(cComLayers)) to hoLayers13
						Set pvComObject of hoLayers13 to voLayers13
							Variant voLayer18
							Get ComItem of hoLayers13 9 to voLayer18
							Handle hoLayer18
							Get Create (RefClass(cComLayer)) to hoLayer18
							Set pvComObject of hoLayer18 to voLayer18
								Variant voLayer19
								Get ComItem of hoLayer18 9 to voLayer19
								Handle hoLayer19
								Get Create (RefClass(cComLayer)) to hoLayer19
								Set pvComObject of hoLayer19 to voLayer19
									Get ComRotamoveCenterY of hoLayer19 to vY1
								Send Destroy to hoLayer19
							Send Destroy to hoLayer18
						Send Destroy to hoLayers13
					Get ComLayerToClientY of hoLayer15 vX1 vY1 to vA7
				Send Destroy to hoLayer15
			Send Destroy to hoLayer14
		Send Destroy to hoLayers11
	Set ComExtraCaption "Client" OLEexLayerCaptionTop to (ComFormatABC(Self,"value - 26",vA7,Nothing,Nothing))
	Variant voLayers14
	Get ComLayers to voLayers14
	Handle hoLayers14
	Get Create (RefClass(cComLayers)) to hoLayers14
	Set pvComObject of hoLayers14 to voLayers14
		Variant voLayer20
		Get ComItem of hoLayers14 7 to voLayer20
		Handle hoLayer20
		Get Create (RefClass(cComLayer)) to hoLayer20
		Set pvComObject of hoLayer20 to voLayer20
			Variant v
				Variant voLayers15
				Get ComLayers to voLayers15
				Handle hoLayers15
				Get Create (RefClass(cComLayers)) to hoLayers15
				Set pvComObject of hoLayers15 to voLayers15
					Variant voLayer21
					Get ComItem of hoLayers15 0 to voLayer21
					Handle hoLayer21
					Get Create (RefClass(cComLayer)) to hoLayer21
					Set pvComObject of hoLayer21 to voLayer21
						Variant voLayer22
						Get ComItem of hoLayer21 0 to voLayer22
						Handle hoLayer22
						Get Create (RefClass(cComLayer)) to hoLayer22
						Set pvComObject of hoLayer22 to voLayer22
							Get ComRotateAngle of hoLayer22 to v
						Send Destroy to hoLayer22
					Send Destroy to hoLayer21
				Send Destroy to hoLayers15
			Set ComRotateAngle of hoLayer20 to v
		Send Destroy to hoLayer20
	Send Destroy to hoLayers14
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant vA8
		Get ComValue to vA8
	Set ComValue to (ComFormatABC(Self,"100 - A - B",vA8,llDelta,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + str(value + 1) + `.png`"
	Variant voLayers16
	Get ComLayers to voLayers16
	Handle hoLayers16
	Get Create (RefClass(cComLayers)) to hoLayers16
	Set pvComObject of hoLayers16 to voLayers16
		Set ComCount of hoLayers16 to 11
	Send Destroy to hoLayers16
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers17
	Get ComLayers to voLayers17
	Handle hoLayers17
	Get Create (RefClass(cComLayers)) to hoLayers17
	Set pvComObject of hoLayers17 to voLayers17
		Variant voLayer23
		Get ComItem of hoLayers17 9 to voLayer23
		Handle hoLayer23
		Get Create (RefClass(cComLayer)) to hoLayer23
		Set pvComObject of hoLayer23 to voLayer23
			Set ComDefaultRotateAngle of hoLayer23 to -126
			Set ComOnDrag of hoLayer23 to OLEexDoRotamove
			Set ComRotateAngleToValue of hoLayer23 to "100 - (value / 360 * 100)"
			Set ComValueToRotateAngle of hoLayer23 to "(value)/100 * 360"
			Set ComValueToOffsetX of hoLayer23 to "value"
			Set ComOffsetToValue of hoLayer23 to "value"
			Set ComRotateAngleValid of hoLayer23 to "int(value / 360 * 100)/100 * 360"
		Send Destroy to hoLayer23
	Send Destroy to hoLayers17
	Variant voLayers18
	Get ComLayers to voLayers18
	Handle hoLayers18
	Get Create (RefClass(cComLayers)) to hoLayers18
	Set pvComObject of hoLayers18 to voLayers18
		Variant voLayer24
		Get ComItem of hoLayers18 3 to voLayer24
		Handle hoLayer24
		Get Create (RefClass(cComLayer)) to hoLayer24
		Set pvComObject of hoLayer24 to voLayer24
			Set ComVisible of hoLayer24 to False
		Send Destroy to hoLayer24
	Send Destroy to hoLayers18
	Variant voLayers19
	Get ComLayers to voLayers19
	Handle hoLayers19
	Get Create (RefClass(cComLayers)) to hoLayers19
	Set pvComObject of hoLayers19 to voLayers19
		Variant voLayer25
		Get ComItem of hoLayers19 4 to voLayer25
		Handle hoLayer25
		Get Create (RefClass(cComLayer)) to hoLayer25
		Set pvComObject of hoLayer25 to voLayer25
			Set ComVisible of hoLayer25 to False
		Send Destroy to hoLayer25
	Send Destroy to hoLayers19
	Variant voLayers20
	Get ComLayers to voLayers20
	Handle hoLayers20
	Get Create (RefClass(cComLayers)) to hoLayers20
	Set pvComObject of hoLayers20 to voLayers20
		Variant voLayer26
		Get ComItem of hoLayers20 0 to voLayer26
		Handle hoLayer26
		Get Create (RefClass(cComLayer)) to hoLayer26
		Set pvComObject of hoLayer26 to voLayer26
			Set ComOnDrag of hoLayer26 to OLEexDoRotate
			Set ComRotateType of hoLayer26 to OLEexRotateBilinearInterpolation
		Send Destroy to hoLayer26
	Send Destroy to hoLayers20
	Variant voLayers21
	Get ComLayers to voLayers21
	Handle hoLayers21
	Get Create (RefClass(cComLayers)) to hoLayers21
	Set pvComObject of hoLayers21 to voLayers21
		Variant voLayer27
		Get ComItem of hoLayers21 7 to voLayer27
		Handle hoLayer27
		Get Create (RefClass(cComLayer)) to hoLayer27
		Set pvComObject of hoLayer27 to voLayer27
			Set ComOnDrag of hoLayer27 to OLEexDoRotate
			Set ComRotateType of hoLayer27 to OLEexRotateBilinearInterpolation
		Send Destroy to hoLayer27
	Send Destroy to hoLayers21
	Set ComValue to 25
	Send ComEndUpdate
End_Procedure
29:
How can I display an indicator

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 1 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v
					Variant vA
					Variant voLayers1
					Get ComLayers to voLayers1
					Handle hoLayers1
					Get Create (RefClass(cComLayers)) to hoLayers1
					Set pvComObject of hoLayers1 to voLayers1
						Variant voLayer1
						Get ComItem of hoLayers1 1 to voLayer1
						Handle hoLayer1
						Get Create (RefClass(cComLayer)) to hoLayer1
						Set pvComObject of hoLayer1 to voLayer1
							Variant voClip1
							Get ComClip of hoLayer1 to voClip1
							Handle hoClip1
							Get Create (RefClass(cComClip)) to hoClip1
							Set pvComObject of hoClip1 to voClip1
								Get ComValue of hoClip1 to vA
							Send Destroy to hoClip1
						Send Destroy to hoLayer1
					Send Destroy to hoLayers1
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v
				Set ComValue of hoClip to v
			Send Destroy to hoClip
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator"
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Set ComCount of hoLayers2 to 3
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 0 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant voBackground
			Get ComBackground of hoLayer2 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Background.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 1 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Variant voBackground1
			Get ComBackground of hoLayer3 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Green_Lights.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Variant voClip2
			Get ComClip of hoLayer3 to voClip2
			Handle hoClip2
			Get Create (RefClass(cComClip)) to hoClip2
			Set pvComObject of hoClip2 to voClip2
				Variant voClipRectangle
				Get ComRectangle of hoClip2 to voClipRectangle
				Handle hoClipRectangle
				Get Create (RefClass(cComClipRectangle)) to hoClipRectangle
				Set pvComObject of hoClipRectangle to voClipRectangle
					Set ComHeight of hoClipRectangle to "(100 - value)/100 * height"
					Set ComInverseClip of hoClipRectangle to True
				Send Destroy to hoClipRectangle
				Set ComValue of hoClip2 to 50
			Send Destroy to hoClip2
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer4
		Get ComItem of hoLayers5 2 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComVisible of hoLayer4 to False
			Variant voBackground2
			Get ComBackground of hoLayer4 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "overlay_top_layer.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
		Send Destroy to hoLayer4
	Send Destroy to hoLayers5
End_Procedure
28:
How can I display a gauge

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 1 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComBrightness of hoLayer OLEexGreenChannel to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant v1
		Variant vA
			Get ComValue to vA
		Get ComFormatABC "A - B" vA llDelta Nothing to v1
	Set ComValue to v1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComBackColor to (RGB(217,217,217))
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Set ComCount of hoLayers1 to 2
	Send Destroy to hoLayers1
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer1
		Get ComItem of hoLayers2 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComRotateCenterY of hoLayer1 to "lheight/2 + 78"
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Guage_Background.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer1
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer2
		Get ComItem of hoLayers3 1 to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Set ComOnDrag of hoLayer2 to OLEexDoRotate
			Variant voBackground1
			Get ComBackground of hoLayer2 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Guage_Needle.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComRotateAngleValid of hoLayer2 to "value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))"
			Set ComRotateAngleToValue of hoLayer2 to "value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50"
			Set ComValueToRotateAngle of hoLayer2 to "value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90"
			Set ComRotateType of hoLayer2 to OLEexRotateBilinearInterpolation
			Set ComBrightness of hoLayer2 OLEexAllChannels to 0
		Send Destroy to hoLayer2
	Send Destroy to hoLayers3
	Set ComValue to 78
	Send ComEndUpdate
End_Procedure
27:
How can I display a clock (rotate,wolf)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "sec" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComValue of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 "min" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Get ComValue to v1
			Set ComValue of hoLayer1 to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 "hour" to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant v2
				Get ComValue to v2
			Set ComValue of hoLayer2 to v2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 "range" to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Variant voClip
			Get ComClip of hoLayer3 to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v3
					Variant voLayers4
					Get ComLayers to voLayers4
					Handle hoLayers4
					Get Create (RefClass(cComLayers)) to hoLayers4
					Set pvComObject of hoLayers4 to voLayers4
						Variant voLayer4
						Get ComItem of hoLayers4 "pointer" to voLayer4
						Handle hoLayer4
						Get Create (RefClass(cComLayer)) to hoLayer4
						Set pvComObject of hoLayer4 to voLayer4
							Variant voLayer5
							Get ComItem of hoLayer4 "pointer" to voLayer5
							Handle hoLayer5
							Get Create (RefClass(cComLayer)) to hoLayer5
							Set pvComObject of hoLayer5 to voLayer5
								Get ComValue of hoLayer5 to v3
							Send Destroy to hoLayer5
						Send Destroy to hoLayer4
					Send Destroy to hoLayers4
				Set ComValue of hoClip to v3
			Send Destroy to hoClip
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = -1
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
		Variant voLayers5
		Get ComLayers to voLayers5
		Handle hoLayers5
		Get Create (RefClass(cComLayers)) to hoLayers5
		Set pvComObject of hoLayers5 to voLayers5
			Variant voLayer6
			Get ComItem of hoLayers5 "pointer" to voLayer6
			Handle hoLayer6
			Get Create (RefClass(cComLayer)) to hoLayer6
			Set pvComObject of hoLayer6 to voLayer6
				Variant voLayer7
				Get ComItem of hoLayer6 "pointer" to voLayer7
				Handle hoLayer7
				Get Create (RefClass(cComLayer)) to hoLayer7
				Set pvComObject of hoLayer7 to voLayer7
					Variant v4
						Variant vA
							Variant voLayers6
							Get ComLayers to voLayers6
							Handle hoLayers6
							Get Create (RefClass(cComLayers)) to hoLayers6
							Set pvComObject of hoLayers6 to voLayers6
								Variant voLayer8
								Get ComItem of hoLayers6 "pointer" to voLayer8
								Handle hoLayer8
								Get Create (RefClass(cComLayer)) to hoLayer8
								Set pvComObject of hoLayer8 to voLayer8
									Variant voLayer9
									Get ComItem of hoLayer8 "pointer" to voLayer9
									Handle hoLayer9
									Get Create (RefClass(cComLayer)) to hoLayer9
									Set pvComObject of hoLayer9 to voLayer9
										Get ComValue of hoLayer9 to vA
									Send Destroy to hoLayer9
								Send Destroy to hoLayer8
							Send Destroy to hoLayers6
						Get ComFormatABC "A - B" vA llDelta Nothing to v4
					Set ComValue of hoLayer7 to v4
				Send Destroy to hoLayer7
			Send Destroy to hoLayer6
		Send Destroy to hoLayers5
End_Procedure

// Occurs when the interval elapses.
Procedure OnComTimer Integer   llTickCount
	Forward Send OnComTimer llTickCount
	Variant v5
		Get ComFormatABC " date(`now`)" Nothing Nothing Nothing to v5
	Set ComValue to v5
		Variant voLayers7
		Get ComLayers to voLayers7
		Handle hoLayers7
		Get Create (RefClass(cComLayers)) to hoLayers7
		Set pvComObject of hoLayers7 to voLayers7
			Variant voLayer10
			Get ComItem of hoLayers7 "pointer" to voLayer10
			Handle hoLayer10
			Get Create (RefClass(cComLayer)) to hoLayer10
			Set pvComObject of hoLayer10 to voLayer10
				Variant voLayer11
				Get ComItem of hoLayer10 "pointer" to voLayer11
				Handle hoLayer11
				Get Create (RefClass(cComLayer)) to hoLayer11
				Set pvComObject of hoLayer11 to voLayer11
					Variant v6
						Get ComFormatABC "sin((value/100 mod 100)/100 * 2 * asin(1)) * 100" llTickCount Nothing Nothing to v6
					Set ComValue of hoLayer11 to v6
				Send Destroy to hoLayer11
			Send Destroy to hoLayer10
		Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer12
		Get ComItem of hoLayers8 "range" to voLayer12
		Handle hoLayer12
		Get Create (RefClass(cComLayer)) to hoLayer12
		Set pvComObject of hoLayer12 to voLayer12
			Variant voClip1
			Get ComClip of hoLayer12 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v7
					Variant voLayers9
					Get ComLayers to voLayers9
					Handle hoLayers9
					Get Create (RefClass(cComLayers)) to hoLayers9
					Set pvComObject of hoLayers9 to voLayers9
						Variant voLayer13
						Get ComItem of hoLayers9 "pointer" to voLayer13
						Handle hoLayer13
						Get Create (RefClass(cComLayer)) to hoLayer13
						Set pvComObject of hoLayer13 to voLayer13
							Variant voLayer14
							Get ComItem of hoLayer13 "pointer" to voLayer14
							Handle hoLayer14
							Get Create (RefClass(cComLayer)) to hoLayer14
							Set pvComObject of hoLayer14 to voLayer14
								Get ComValue of hoLayer14 to v7
							Send Destroy to hoLayer14
						Send Destroy to hoLayer13
					Send Destroy to hoLayers9
				Set ComValue of hoClip1 to v7
			Send Destroy to hoClip1
		Send Destroy to hoLayer12
	Send Destroy to hoLayers8
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers10
	Get ComLayers to voLayers10
	Handle hoLayers10
	Get Create (RefClass(cComLayers)) to hoLayers10
	Set pvComObject of hoLayers10 to voLayers10
		Set ComCount of hoLayers10 to 9
	Send Destroy to hoLayers10
	Variant voLayers11
	Get ComLayers to voLayers11
	Handle hoLayers11
	Get Create (RefClass(cComLayers)) to hoLayers11
	Set pvComObject of hoLayers11 to voLayers11
		Variant voLayer15
		Get ComItem of hoLayers11 0 to voLayer15
		Handle hoLayer15
		Get Create (RefClass(cComLayer)) to hoLayer15
		Set pvComObject of hoLayer15 to voLayer15
			Set ComLeft of hoLayer15 to "(width-512)/2"
			Set ComTop of hoLayer15 to "(height-512)/2"
			Set ComHeight of hoLayer15 to 512
			Set ComWidth of hoLayer15 to 512
			Variant voBackground
			Get ComBackground of hoLayer15 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Back.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer15
	Send Destroy to hoLayers11
	Variant voLayers12
	Get ComLayers to voLayers12
	Handle hoLayers12
	Get Create (RefClass(cComLayers)) to hoLayers12
	Set pvComObject of hoLayers12 to voLayers12
		Variant voLayer16
		Get ComItem of hoLayers12 1 to voLayer16
		Handle hoLayer16
		Get Create (RefClass(cComLayer)) to hoLayer16
		Set pvComObject of hoLayer16 to voLayer16
			Set ComKey of hoLayer16 to "scale"
			Set ComDefaultOffsetX of hoLayer16 to -90
			Set ComDefaultOffsetY of hoLayer16 to -150
			Variant voBackground1
			Get ComBackground of hoLayer16 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "Scale.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComRotateCenterLayer of hoLayer16 to 1
			Set ComRotateCenterX of hoLayer16 to "(lwidth+181)/2"
			Set ComRotateCenterY of hoLayer16 to "(lheight+232)/2"
		Send Destroy to hoLayer16
	Send Destroy to hoLayers12
	Variant voLayers13
	Get ComLayers to voLayers13
	Handle hoLayers13
	Get Create (RefClass(cComLayers)) to hoLayers13
	Set pvComObject of hoLayers13 to voLayers13
		Variant voLayer17
		Get ComItem of hoLayers13 2 to voLayer17
		Handle hoLayer17
		Get Create (RefClass(cComLayer)) to hoLayer17
		Set pvComObject of hoLayer17 to voLayer17
			Set ComKey of hoLayer17 to "range"
			Variant v8
				Variant voLayers14
				Get ComLayers to voLayers14
				Handle hoLayers14
				Get Create (RefClass(cComLayers)) to hoLayers14
				Set pvComObject of hoLayers14 to voLayers14
					Variant voLayer18
					Get ComItem of hoLayers14 "scale" to voLayer18
					Handle hoLayer18
					Get Create (RefClass(cComLayer)) to hoLayer18
					Set pvComObject of hoLayer18 to voLayer18
						Variant voLayer19
						Get ComItem of hoLayer18 "scale" to voLayer19
						Handle hoLayer19
						Get Create (RefClass(cComLayer)) to hoLayer19
						Set pvComObject of hoLayer19 to voLayer19
							Get ComDefaultOffsetX of hoLayer19 to v8
						Send Destroy to hoLayer19
					Send Destroy to hoLayer18
				Send Destroy to hoLayers14
			Set ComDefaultOffsetX of hoLayer17 to v8
			Variant v9
				Variant voLayers15
				Get ComLayers to voLayers15
				Handle hoLayers15
				Get Create (RefClass(cComLayers)) to hoLayers15
				Set pvComObject of hoLayers15 to voLayers15
					Variant voLayer20
					Get ComItem of hoLayers15 "scale" to voLayer20
					Handle hoLayer20
					Get Create (RefClass(cComLayer)) to hoLayer20
					Set pvComObject of hoLayer20 to voLayer20
						Variant voLayer21
						Get ComItem of hoLayer20 "scale" to voLayer21
						Handle hoLayer21
						Get Create (RefClass(cComLayer)) to hoLayer21
						Set pvComObject of hoLayer21 to voLayer21
							Get ComDefaultOffsetY of hoLayer21 to v9
						Send Destroy to hoLayer21
					Send Destroy to hoLayer20
				Send Destroy to hoLayers15
			Set ComDefaultOffsetY of hoLayer17 to v9
			Variant v10
				Variant voLayers16
				Get ComLayers to voLayers16
				Handle hoLayers16
				Get Create (RefClass(cComLayers)) to hoLayers16
				Set pvComObject of hoLayers16 to voLayers16
					Variant voLayer22
					Get ComItem of hoLayers16 "scale" to voLayer22
					Handle hoLayer22
					Get Create (RefClass(cComLayer)) to hoLayer22
					Set pvComObject of hoLayer22 to voLayer22
						Variant voLayer23
						Get ComItem of hoLayer22 "scale" to voLayer23
						Handle hoLayer23
						Get Create (RefClass(cComLayer)) to hoLayer23
						Set pvComObject of hoLayer23 to voLayer23
							Get ComIndex of hoLayer23 to v10
						Send Destroy to hoLayer23
					Send Destroy to hoLayer22
				Send Destroy to hoLayers16
			Set ComRotateCenterLayer of hoLayer17 to v10
			Variant voBackground2
			Get ComBackground of hoLayer17 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "ScalePointerArc.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Variant v11
				Variant voLayers17
				Get ComLayers to voLayers17
				Handle hoLayers17
				Get Create (RefClass(cComLayers)) to hoLayers17
				Set pvComObject of hoLayers17 to voLayers17
					Variant voLayer24
					Get ComItem of hoLayers17 "scale" to voLayer24
					Handle hoLayer24
					Get Create (RefClass(cComLayer)) to hoLayer24
					Set pvComObject of hoLayer24 to voLayer24
						Variant voLayer25
						Get ComItem of hoLayer24 "scale" to voLayer25
						Handle hoLayer25
						Get Create (RefClass(cComLayer)) to hoLayer25
						Set pvComObject of hoLayer25 to voLayer25
							Get ComIndex of hoLayer25 to v11
						Send Destroy to hoLayer25
					Send Destroy to hoLayer24
				Send Destroy to hoLayers17
			Set ComRotateCenterLayer of hoLayer17 to v11
			Variant voClip2
			Get ComClip of hoLayer17 to voClip2
			Handle hoClip2
			Get Create (RefClass(cComClip)) to hoClip2
			Set pvComObject of hoClip2 to voClip2
				Variant voClipPie
				Get ComPie of hoClip2 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComRadiusX of hoClipPie to 100
					Set ComRadiusY of hoClipPie to 100
					Variant v12
						Variant voLayers18
						Get ComLayers to voLayers18
						Handle hoLayers18
						Get Create (RefClass(cComLayers)) to hoLayers18
						Set pvComObject of hoLayers18 to voLayers18
							Variant voLayer26
							Get ComItem of hoLayers18 "scale" to voLayer26
							Handle hoLayer26
							Get Create (RefClass(cComLayer)) to hoLayer26
							Set pvComObject of hoLayer26 to voLayer26
								Variant voLayer27
								Get ComItem of hoLayer26 "scale" to voLayer27
								Handle hoLayer27
								Get Create (RefClass(cComLayer)) to hoLayer27
								Set pvComObject of hoLayer27 to voLayer27
									Get ComRotateCenterX of hoLayer27 to v12
								Send Destroy to hoLayer27
							Send Destroy to hoLayer26
						Send Destroy to hoLayers18
					Set ComCenterX of hoClipPie to v12
					Variant v13
						Variant voLayers19
						Get ComLayers to voLayers19
						Handle hoLayers19
						Get Create (RefClass(cComLayers)) to hoLayers19
						Set pvComObject of hoLayers19 to voLayers19
							Variant voLayer28
							Get ComItem of hoLayers19 "scale" to voLayer28
							Handle hoLayer28
							Get Create (RefClass(cComLayer)) to hoLayer28
							Set pvComObject of hoLayer28 to voLayer28
								Variant voLayer29
								Get ComItem of hoLayer28 "scale" to voLayer29
								Handle hoLayer29
								Get Create (RefClass(cComLayer)) to hoLayer29
								Set pvComObject of hoLayer29 to voLayer29
									Get ComRotateCenterY of hoLayer29 to v13
								Send Destroy to hoLayer29
							Send Destroy to hoLayer28
						Send Destroy to hoLayers19
					Set ComCenterY of hoClipPie to v13
					Set ComStartAngle of hoClipPie to -148
					Set ComSweepAngle of hoClipPie to "value/100 * 300"
				Send Destroy to hoClipPie
			Send Destroy to hoClip2
		Send Destroy to hoLayer17
	Send Destroy to hoLayers13
	Variant voLayers20
	Get ComLayers to voLayers20
	Handle hoLayers20
	Get Create (RefClass(cComLayers)) to hoLayers20
	Set pvComObject of hoLayers20 to voLayers20
		Variant voLayer30
		Get ComItem of hoLayers20 3 to voLayer30
		Handle hoLayer30
		Get Create (RefClass(cComLayer)) to hoLayer30
		Set pvComObject of hoLayer30 to voLayer30
			Set ComKey of hoLayer30 to "pointer"
			Variant v14
				Variant voLayers21
				Get ComLayers to voLayers21
				Handle hoLayers21
				Get Create (RefClass(cComLayers)) to hoLayers21
				Set pvComObject of hoLayers21 to voLayers21
					Variant voLayer31
					Get ComItem of hoLayers21 "scale" to voLayer31
					Handle hoLayer31
					Get Create (RefClass(cComLayer)) to hoLayer31
					Set pvComObject of hoLayer31 to voLayer31
						Variant voLayer32
						Get ComItem of hoLayer31 "scale" to voLayer32
						Handle hoLayer32
						Get Create (RefClass(cComLayer)) to hoLayer32
						Set pvComObject of hoLayer32 to voLayer32
							Get ComDefaultOffsetX of hoLayer32 to v14
						Send Destroy to hoLayer32
					Send Destroy to hoLayer31
				Send Destroy to hoLayers21
			Set ComDefaultOffsetX of hoLayer30 to v14
			Variant v15
				Variant voLayers22
				Get ComLayers to voLayers22
				Handle hoLayers22
				Get Create (RefClass(cComLayers)) to hoLayers22
				Set pvComObject of hoLayers22 to voLayers22
					Variant voLayer33
					Get ComItem of hoLayers22 "scale" to voLayer33
					Handle hoLayer33
					Get Create (RefClass(cComLayer)) to hoLayer33
					Set pvComObject of hoLayer33 to voLayer33
						Variant voLayer34
						Get ComItem of hoLayer33 "scale" to voLayer34
						Handle hoLayer34
						Get Create (RefClass(cComLayer)) to hoLayer34
						Set pvComObject of hoLayer34 to voLayer34
							Get ComDefaultOffsetY of hoLayer34 to v15
						Send Destroy to hoLayer34
					Send Destroy to hoLayer33
				Send Destroy to hoLayers22
			Set ComDefaultOffsetY of hoLayer30 to v15
			Variant voBackground3
			Get ComBackground of hoLayer30 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "ScalePointer.png"
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Variant v16
				Variant voLayers23
				Get ComLayers to voLayers23
				Handle hoLayers23
				Get Create (RefClass(cComLayers)) to hoLayers23
				Set pvComObject of hoLayers23 to voLayers23
					Variant voLayer35
					Get ComItem of hoLayers23 "scale" to voLayer35
					Handle hoLayer35
					Get Create (RefClass(cComLayer)) to hoLayer35
					Set pvComObject of hoLayer35 to voLayer35
						Variant voLayer36
						Get ComItem of hoLayer35 "scale" to voLayer36
						Handle hoLayer36
						Get Create (RefClass(cComLayer)) to hoLayer36
						Set pvComObject of hoLayer36 to voLayer36
							Get ComIndex of hoLayer36 to v16
						Send Destroy to hoLayer36
					Send Destroy to hoLayer35
				Send Destroy to hoLayers23
			Set ComRotateCenterLayer of hoLayer30 to v16
			Set ComOnDrag of hoLayer30 to OLEexDoRotate
			Set ComDefaultRotateAngle of hoLayer30 to -148
			Set ComRotateAngleValid of hoLayer30 to "value > 300 ? (value > 330 ? 0 : 300) : value"
			Set ComRotateAngleToValue of hoLayer30 to "value / 300 * 100"
			Set ComValueToRotateAngle of hoLayer30 to "value /100 * 300"
		Send Destroy to hoLayer30
	Send Destroy to hoLayers20
	Variant voLayers24
	Get ComLayers to voLayers24
	Handle hoLayers24
	Get Create (RefClass(cComLayers)) to hoLayers24
	Set pvComObject of hoLayers24 to voLayers24
		Variant voLayer37
		Get ComItem of hoLayers24 4 to voLayer37
		Handle hoLayer37
		Get Create (RefClass(cComLayer)) to hoLayer37
		Set pvComObject of hoLayer37 to voLayer37
			Set ComKey of hoLayer37 to "bolt"
			Variant v17
				Variant voLayers25
				Get ComLayers to voLayers25
				Handle hoLayers25
				Get Create (RefClass(cComLayers)) to hoLayers25
				Set pvComObject of hoLayers25 to voLayers25
					Variant voLayer38
					Get ComItem of hoLayers25 "scale" to voLayer38
					Handle hoLayer38
					Get Create (RefClass(cComLayer)) to hoLayer38
					Set pvComObject of hoLayer38 to voLayer38
						Variant voLayer39
						Get ComItem of hoLayer38 "scale" to voLayer39
						Handle hoLayer39
						Get Create (RefClass(cComLayer)) to hoLayer39
						Set pvComObject of hoLayer39 to voLayer39
							Get ComDefaultOffsetX of hoLayer39 to v17
						Send Destroy to hoLayer39
					Send Destroy to hoLayer38
				Send Destroy to hoLayers25
			Set ComDefaultOffsetX of hoLayer37 to v17
			Variant v18
				Variant voLayers26
				Get ComLayers to voLayers26
				Handle hoLayers26
				Get Create (RefClass(cComLayers)) to hoLayers26
				Set pvComObject of hoLayers26 to voLayers26
					Variant voLayer40
					Get ComItem of hoLayers26 "scale" to voLayer40
					Handle hoLayer40
					Get Create (RefClass(cComLayer)) to hoLayer40
					Set pvComObject of hoLayer40 to voLayer40
						Variant voLayer41
						Get ComItem of hoLayer40 "scale" to voLayer41
						Handle hoLayer41
						Get Create (RefClass(cComLayer)) to hoLayer41
						Set pvComObject of hoLayer41 to voLayer41
							Get ComDefaultOffsetY of hoLayer41 to v18
						Send Destroy to hoLayer41
					Send Destroy to hoLayer40
				Send Destroy to hoLayers26
			Set ComDefaultOffsetY of hoLayer37 to v18
			Variant voBackground4
			Get ComBackground of hoLayer37 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voPicture4
				Get ComPicture of hoBackground4 to voPicture4
				Handle hoPicture4
				Get Create (RefClass(cComPicture)) to hoPicture4
				Set pvComObject of hoPicture4 to voPicture4
					Set ComName of hoPicture4 to "Bolt.png"
				Send Destroy to hoPicture4
			Send Destroy to hoBackground4
		Send Destroy to hoLayer37
	Send Destroy to hoLayers24
	Variant voLayers27
	Get ComLayers to voLayers27
	Handle hoLayers27
	Get Create (RefClass(cComLayers)) to hoLayers27
	Set pvComObject of hoLayers27 to voLayers27
		Variant voLayer42
		Get ComItem of hoLayers27 5 to voLayer42
		Handle hoLayer42
		Get Create (RefClass(cComLayer)) to hoLayer42
		Set pvComObject of hoLayer42 to voLayer42
			Set ComLeft of hoLayer42 to "(width-512)/2"
			Set ComTop of hoLayer42 to "(height-512)/2"
			Set ComHeight of hoLayer42 to 512
			Set ComWidth of hoLayer42 to 512
			Set ComKey of hoLayer42 to "sec"
			Set ComOnDrag of hoLayer42 to OLEexDoRotate
			Set ComSelectable of hoLayer42 to False
			Variant voBackground5
			Get ComBackground of hoLayer42 to voBackground5
			Handle hoBackground5
			Get Create (RefClass(cComBackground)) to hoBackground5
			Set pvComObject of hoBackground5 to voBackground5
				Variant voPicture5
				Get ComPicture of hoBackground5 to voPicture5
				Handle hoPicture5
				Get Create (RefClass(cComPicture)) to hoPicture5
				Set pvComObject of hoPicture5 to voPicture5
					Set ComName of hoPicture5 to "second-hand.png"
				Send Destroy to hoPicture5
			Send Destroy to hoBackground5
			Set ComValueToRotateAngle of hoLayer42 to "((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"
			Set ComRotateAngleToValue of hoLayer42 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer42
	Send Destroy to hoLayers27
	Variant voLayers28
	Get ComLayers to voLayers28
	Handle hoLayers28
	Get Create (RefClass(cComLayers)) to hoLayers28
	Set pvComObject of hoLayers28 to voLayers28
		Variant voLayer43
		Get ComItem of hoLayers28 6 to voLayer43
		Handle hoLayer43
		Get Create (RefClass(cComLayer)) to hoLayer43
		Set pvComObject of hoLayer43 to voLayer43
			Set ComLeft of hoLayer43 to "(width-512)/2"
			Set ComTop of hoLayer43 to "(height-512)/2"
			Set ComHeight of hoLayer43 to 512
			Set ComWidth of hoLayer43 to 512
			Set ComKey of hoLayer43 to "min"
			Set ComOnDrag of hoLayer43 to OLEexDoRotate
			Set ComSelectable of hoLayer43 to False
			Variant voBackground6
			Get ComBackground of hoLayer43 to voBackground6
			Handle hoBackground6
			Get Create (RefClass(cComBackground)) to hoBackground6
			Set pvComObject of hoBackground6 to voBackground6
				Variant voPicture6
				Get ComPicture of hoBackground6 to voPicture6
				Handle hoPicture6
				Get Create (RefClass(cComPicture)) to hoPicture6
				Set pvComObject of hoPicture6 to voPicture6
					Set ComName of hoPicture6 to "Minute.png"
				Send Destroy to hoPicture6
			Send Destroy to hoBackground6
			Set ComValueToRotateAngle of hoLayer43 to "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
			Set ComRotateAngleToValue of hoLayer43 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer43
	Send Destroy to hoLayers28
	Variant voLayers29
	Get ComLayers to voLayers29
	Handle hoLayers29
	Get Create (RefClass(cComLayers)) to hoLayers29
	Set pvComObject of hoLayers29 to voLayers29
		Variant voLayer44
		Get ComItem of hoLayers29 7 to voLayer44
		Handle hoLayer44
		Get Create (RefClass(cComLayer)) to hoLayer44
		Set pvComObject of hoLayer44 to voLayer44
			Set ComLeft of hoLayer44 to "(width-512)/2"
			Set ComTop of hoLayer44 to "(height-512)/2"
			Set ComHeight of hoLayer44 to 512
			Set ComWidth of hoLayer44 to 512
			Set ComKey of hoLayer44 to "hour"
			Set ComOnDrag of hoLayer44 to OLEexDoRotate
			Variant voBackground7
			Get ComBackground of hoLayer44 to voBackground7
			Handle hoBackground7
			Get Create (RefClass(cComBackground)) to hoBackground7
			Set pvComObject of hoBackground7 to voBackground7
				Variant voPicture7
				Get ComPicture of hoBackground7 to voPicture7
				Handle hoPicture7
				Get Create (RefClass(cComPicture)) to hoPicture7
				Set pvComObject of hoPicture7 to voPicture7
					Set ComName of hoPicture7 to "Hour.png"
				Send Destroy to hoPicture7
			Send Destroy to hoBackground7
			Set ComValueToRotateAngle of hoLayer44 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer44 to "value / 360 * 0.5"
		Send Destroy to hoLayer44
	Send Destroy to hoLayers29
	Variant voLayers30
	Get ComLayers to voLayers30
	Handle hoLayers30
	Get Create (RefClass(cComLayers)) to hoLayers30
	Set pvComObject of hoLayers30 to voLayers30
		Variant voLayer45
		Get ComItem of hoLayers30 8 to voLayer45
		Handle hoLayer45
		Get Create (RefClass(cComLayer)) to hoLayer45
		Set pvComObject of hoLayer45 to voLayer45
			Set ComLeft of hoLayer45 to "(width-512)/2"
			Set ComTop of hoLayer45 to "(height-512)/2"
			Set ComHeight of hoLayer45 to 512
			Set ComWidth of hoLayer45 to 512
			Set ComKey of hoLayer45 to "front"
			Set ComOnDrag of hoLayer45 to OLEexDoRotate
			Variant voBackground8
			Get ComBackground of hoLayer45 to voBackground8
			Handle hoBackground8
			Get Create (RefClass(cComBackground)) to hoBackground8
			Set pvComObject of hoBackground8 to voBackground8
				Variant voPicture8
				Get ComPicture of hoBackground8 to voPicture8
				Handle hoPicture8
				Get Create (RefClass(cComPicture)) to hoPicture8
				Set pvComObject of hoPicture8 to voPicture8
					Set ComName of hoPicture8 to "front.png"
				Send Destroy to hoPicture8
			Send Destroy to hoBackground8
		Send Destroy to hoLayer45
	Send Destroy to hoLayers30
	Variant v19
		Variant voLayers31
		Get ComLayers to voLayers31
		Handle hoLayers31
		Get Create (RefClass(cComLayers)) to hoLayers31
		Set pvComObject of hoLayers31 to voLayers31
			Variant voLayer46
			Get ComItem of hoLayers31 "hour" to voLayer46
			Handle hoLayer46
			Get Create (RefClass(cComLayer)) to hoLayer46
			Set pvComObject of hoLayer46 to voLayer46
				Variant voLayer47
				Get ComItem of hoLayer46 "hour" to voLayer47
				Handle hoLayer47
				Get Create (RefClass(cComLayer)) to hoLayer47
				Set pvComObject of hoLayer47 to voLayer47
					Get ComIndex of hoLayer47 to v19
				Send Destroy to hoLayer47
			Send Destroy to hoLayer46
		Send Destroy to hoLayers31
	Set ComLayerOfValue to v19
	Set ComValue to (ComFormatABC(Self,"date(`now`)",Nothing,Nothing,Nothing))
	Set ComTimerInterval to 100
End_Procedure
26:
How can I display a clock (rotate,vintage)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "sec" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComValue of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 "min" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Get ComValue to v1
			Set ComValue of hoLayer1 to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 "hour" to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant v2
				Get ComValue to v2
			Set ComValue of hoLayer2 to v2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
		Variant v3
			Variant vA
				Get ComValue to vA
			Get ComFormatABC "A - 1/24/60/60*B" vA llDelta Nothing to v3
		Set ComValue to v3
End_Procedure

// Occurs when the interval elapses.
Procedure OnComTimer Integer   llTickCount
	Forward Send OnComTimer llTickCount
	Set ComValue to (ComFormatABC(Self,"value + 1/24/60/60",(ComValue(Self)),Nothing,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 5
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 0 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComLeft of hoLayer3 to "(width-512)/2"
			Set ComTop of hoLayer3 to "(height-512)/2"
			Set ComHeight of hoLayer3 to 512
			Set ComWidth of hoLayer3 to 512
			Variant voBackground
			Get ComBackground of hoLayer3 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Back.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer4
		Get ComItem of hoLayers5 1 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComPosition of hoLayer4 to 3
			Set ComLeft of hoLayer4 to "(width-512)/2"
			Set ComTop of hoLayer4 to "(height-512)/2"
			Set ComHeight of hoLayer4 to 512
			Set ComWidth of hoLayer4 to 512
			Set ComKey of hoLayer4 to "sec"
			Set ComOnDrag of hoLayer4 to OLEexDoRotate
			Set ComSelectable of hoLayer4 to False
			Variant voBackground1
			Get ComBackground of hoLayer4 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "second-hand.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComValueToRotateAngle of hoLayer4 to "((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"
			Set ComRotateAngleToValue of hoLayer4 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer4
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer5
		Get ComItem of hoLayers6 2 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Set ComLeft of hoLayer5 to "(width-512)/2"
			Set ComTop of hoLayer5 to "(height-512)/2"
			Set ComHeight of hoLayer5 to 512
			Set ComWidth of hoLayer5 to 512
			Set ComPosition of hoLayer5 to 2
			Set ComKey of hoLayer5 to "min"
			Set ComOnDrag of hoLayer5 to OLEexDoRotate
			Set ComSelectable of hoLayer5 to False
			Variant voBackground2
			Get ComBackground of hoLayer5 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "Minute.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Set ComValueToRotateAngle of hoLayer5 to "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
			Set ComRotateAngleToValue of hoLayer5 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer5
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer6
		Get ComItem of hoLayers7 3 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComLeft of hoLayer6 to "(width-512)/2"
			Set ComTop of hoLayer6 to "(height-512)/2"
			Set ComHeight of hoLayer6 to 512
			Set ComWidth of hoLayer6 to 512
			Set ComPosition of hoLayer6 to 1
			Set ComKey of hoLayer6 to "hour"
			Set ComOnDrag of hoLayer6 to OLEexDoRotate
			Variant voBackground3
			Get ComBackground of hoLayer6 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "Hour.png"
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Set ComValueToRotateAngle of hoLayer6 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer6 to "value / 360 * 0.5"
		Send Destroy to hoLayer6
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer7
		Get ComItem of hoLayers8 4 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComLeft of hoLayer7 to "(width-512)/2"
			Set ComTop of hoLayer7 to "(height-512)/2"
			Set ComHeight of hoLayer7 to 512
			Set ComWidth of hoLayer7 to 512
			Set ComPosition of hoLayer7 to 1
			Set ComKey of hoLayer7 to "front"
			Set ComOnDrag of hoLayer7 to OLEexDoRotate
			Variant voBackground4
			Get ComBackground of hoLayer7 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voPicture4
				Get ComPicture of hoBackground4 to voPicture4
				Handle hoPicture4
				Get Create (RefClass(cComPicture)) to hoPicture4
				Set pvComObject of hoPicture4 to voPicture4
					Set ComName of hoPicture4 to "front.png"
				Send Destroy to hoPicture4
			Send Destroy to hoBackground4
			Set ComValueToRotateAngle of hoLayer7 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer7 to "value / 360 * 0.5"
		Send Destroy to hoLayer7
	Send Destroy to hoLayers8
	Set ComLayerOfValue to 3
	Set ComValue to (ComFormatABC(Self,"date(`now`)",Nothing,Nothing,Nothing))
	Set ComTimerInterval to 1000
End_Procedure
25:
How can I display a clock (rotate,london)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "sec" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComValue of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 "min" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Get ComValue to v1
			Set ComValue of hoLayer1 to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 "hour" to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant v2
				Get ComValue to v2
			Set ComValue of hoLayer2 to v2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
		Variant v3
			Variant vA
				Get ComValue to vA
			Get ComFormatABC "A - 1/24/60/60*B" vA llDelta Nothing to v3
		Set ComValue to v3
End_Procedure

// Occurs when the interval elapses.
Procedure OnComTimer Integer   llTickCount
	Forward Send OnComTimer llTickCount
	Variant v4
		Get ComFormatABC "value + 1/24/60/60" (ComValue(Self)) Nothing Nothing to v4
	Set ComValue to v4
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 6
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 0 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComLeft of hoLayer3 to "(width-512)/2"
			Set ComTop of hoLayer3 to "(height-512)/2"
			Set ComHeight of hoLayer3 to 512
			Set ComWidth of hoLayer3 to 512
			Variant voBackground
			Get ComBackground of hoLayer3 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "Back.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer4
		Get ComItem of hoLayers5 1 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComPosition of hoLayer4 to 3
			Set ComLeft of hoLayer4 to "(width-512)/2"
			Set ComTop of hoLayer4 to "(height-512)/2"
			Set ComHeight of hoLayer4 to 512
			Set ComWidth of hoLayer4 to 512
			Set ComKey of hoLayer4 to "sec"
			Set ComOnDrag of hoLayer4 to OLEexDoRotate
			Set ComSelectable of hoLayer4 to False
			Set ComRotateCenterLayer of hoLayer4 to 1
			Variant voBackground1
			Get ComBackground of hoLayer4 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "second-hand.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComValueToRotateAngle of hoLayer4 to "((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"
			Set ComRotateAngleToValue of hoLayer4 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer4
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer5
		Get ComItem of hoLayers6 2 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Set ComLeft of hoLayer5 to "(width-512)/2"
			Set ComTop of hoLayer5 to "(height-512)/2"
			Set ComHeight of hoLayer5 to 512
			Set ComWidth of hoLayer5 to 512
			Set ComPosition of hoLayer5 to 2
			Set ComRotateCenterLayer of hoLayer5 to 2
			Set ComKey of hoLayer5 to "min"
			Set ComOnDrag of hoLayer5 to OLEexDoRotate
			Set ComSelectable of hoLayer5 to False
			Variant voBackground2
			Get ComBackground of hoLayer5 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "Minute.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Set ComValueToRotateAngle of hoLayer5 to "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
			Set ComRotateAngleToValue of hoLayer5 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer5
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer6
		Get ComItem of hoLayers7 3 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComLeft of hoLayer6 to "(width-512)/2"
			Set ComTop of hoLayer6 to "(height-512)/2"
			Set ComHeight of hoLayer6 to 512
			Set ComWidth of hoLayer6 to 512
			Set ComPosition of hoLayer6 to 1
			Set ComKey of hoLayer6 to "hour"
			Set ComRotateCenterLayer of hoLayer6 to 3
			Set ComOnDrag of hoLayer6 to OLEexDoRotate
			Variant voBackground3
			Get ComBackground of hoLayer6 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "Hour.png"
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Set ComValueToRotateAngle of hoLayer6 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer6 to "value / 360 * 0.5"
		Send Destroy to hoLayer6
	Send Destroy to hoLayers7
	Variant voLayers8
	Get ComLayers to voLayers8
	Handle hoLayers8
	Get Create (RefClass(cComLayers)) to hoLayers8
	Set pvComObject of hoLayers8 to voLayers8
		Variant voLayer7
		Get ComItem of hoLayers8 4 to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComLeft of hoLayer7 to "(width-512)/2"
			Set ComTop of hoLayer7 to "(height-512)/2"
			Set ComHeight of hoLayer7 to 512
			Set ComWidth of hoLayer7 to 512
			Set ComPosition of hoLayer7 to 1
			Set ComKey of hoLayer7 to "front"
			Set ComRotateCenterLayer of hoLayer7 to 4
			Set ComOnDrag of hoLayer7 to OLEexDoRotate
			Variant voBackground4
			Get ComBackground of hoLayer7 to voBackground4
			Handle hoBackground4
			Get Create (RefClass(cComBackground)) to hoBackground4
			Set pvComObject of hoBackground4 to voBackground4
				Variant voPicture4
				Get ComPicture of hoBackground4 to voPicture4
				Handle hoPicture4
				Get Create (RefClass(cComPicture)) to hoPicture4
				Set pvComObject of hoPicture4 to voPicture4
					Set ComName of hoPicture4 to "front.png"
				Send Destroy to hoPicture4
			Send Destroy to hoBackground4
			Set ComValueToRotateAngle of hoLayer7 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer7 to "value / 360 * 0.5"
		Send Destroy to hoLayer7
	Send Destroy to hoLayers8
	Variant voLayers9
	Get ComLayers to voLayers9
	Handle hoLayers9
	Get Create (RefClass(cComLayers)) to hoLayers9
	Set pvComObject of hoLayers9 to voLayers9
		Variant voLayer8
		Get ComItem of hoLayers9 5 to voLayer8
		Handle hoLayer8
		Get Create (RefClass(cComLayer)) to hoLayer8
		Set pvComObject of hoLayer8 to voLayer8
			Set ComLeft of hoLayer8 to "(width-512)/2"
			Set ComTop of hoLayer8 to "(height-512)/2"
			Set ComHeight of hoLayer8 to 512
			Set ComWidth of hoLayer8 to 512
			Set ComKey of hoLayer8 to "bolt"
			Set ComRotateCenterLayer of hoLayer8 to 5
			Variant voBackground5
			Get ComBackground of hoLayer8 to voBackground5
			Handle hoBackground5
			Get Create (RefClass(cComBackground)) to hoBackground5
			Set pvComObject of hoBackground5 to voBackground5
				Variant voPicture5
				Get ComPicture of hoBackground5 to voPicture5
				Handle hoPicture5
				Get Create (RefClass(cComPicture)) to hoPicture5
				Set pvComObject of hoPicture5 to voPicture5
					Set ComName of hoPicture5 to "Bolt.png"
				Send Destroy to hoPicture5
			Send Destroy to hoBackground5
		Send Destroy to hoLayer8
	Send Destroy to hoLayers9
	Variant v5
		Variant voLayers10
		Get ComLayers to voLayers10
		Handle hoLayers10
		Get Create (RefClass(cComLayers)) to hoLayers10
		Set pvComObject of hoLayers10 to voLayers10
			Variant voLayer9
			Get ComItem of hoLayers10 "hour" to voLayer9
			Handle hoLayer9
			Get Create (RefClass(cComLayer)) to hoLayer9
			Set pvComObject of hoLayer9 to voLayer9
				Variant voLayer10
				Get ComItem of hoLayer9 "hour" to voLayer10
				Handle hoLayer10
				Get Create (RefClass(cComLayer)) to hoLayer10
				Set pvComObject of hoLayer10 to voLayer10
					Get ComIndex of hoLayer10 to v5
				Send Destroy to hoLayer10
			Send Destroy to hoLayer9
		Send Destroy to hoLayers10
	Set ComLayerOfValue to v5
	Variant v6
		Get ComFormatABC "date(`now`)" Nothing Nothing Nothing to v6
	Set ComValue to v6
	Set ComTimerInterval to 1000
End_Procedure
24:
How can I display a clock (rotate)

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "sec" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
				Get ComValue to v
			Set ComValue of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 "min" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant v1
				Get ComValue to v1
			Set ComValue of hoLayer1 to v1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Variant voLayer2
		Get ComItem of hoLayers2 "hour" to voLayer2
		Handle hoLayer2
		Get Create (RefClass(cComLayer)) to hoLayer2
		Set pvComObject of hoLayer2 to voLayer2
			Variant v2
				Get ComValue to v2
			Set ComValue of hoLayer2 to v2
		Send Destroy to hoLayer2
	Send Destroy to hoLayers2
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
		Variant v3
			Variant vA
				Get ComValue to vA
			Get ComFormatABC "A - 1/24/60/60*B" vA llDelta Nothing to v3
		Set ComValue to v3
End_Procedure

// Occurs when the interval elapses.
Procedure OnComTimer Integer   llTickCount
	Forward Send OnComTimer llTickCount
	Set ComValue to (ComFormatABC(Self,"value + 1/24/60/60",(ComValue(Self)),Nothing,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock"
	Set ComDefaultLayer OLEexDefLayerRotateType to 2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 4
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer3
		Get ComItem of hoLayers4 0 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Variant voBackground
			Get ComBackground of hoLayer3 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComName of hoPicture to "vista_clock.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
		Send Destroy to hoLayer3
	Send Destroy to hoLayers4
	Variant voLayers5
	Get ComLayers to voLayers5
	Handle hoLayers5
	Get Create (RefClass(cComLayers)) to hoLayers5
	Set pvComObject of hoLayers5 to voLayers5
		Variant voLayer4
		Get ComItem of hoLayers5 1 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComPosition of hoLayer4 to 3
			Set ComKey of hoLayer4 to "sec"
			Set ComOnDrag of hoLayer4 to OLEexDoRotate
			Set ComSelectable of hoLayer4 to False
			Variant voBackground1
			Get ComBackground of hoLayer4 to voBackground1
			Handle hoBackground1
			Get Create (RefClass(cComBackground)) to hoBackground1
			Set pvComObject of hoBackground1 to voBackground1
				Variant voPicture1
				Get ComPicture of hoBackground1 to voPicture1
				Handle hoPicture1
				Get Create (RefClass(cComPicture)) to hoPicture1
				Set pvComObject of hoPicture1 to voPicture1
					Set ComName of hoPicture1 to "second-hand.png"
				Send Destroy to hoPicture1
			Send Destroy to hoBackground1
			Set ComValueToRotateAngle of hoLayer4 to "((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"
			Set ComRotateAngleToValue of hoLayer4 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer4
	Send Destroy to hoLayers5
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer5
		Get ComItem of hoLayers6 2 to voLayer5
		Handle hoLayer5
		Get Create (RefClass(cComLayer)) to hoLayer5
		Set pvComObject of hoLayer5 to voLayer5
			Set ComPosition of hoLayer5 to 2
			Set ComKey of hoLayer5 to "min"
			Set ComOnDrag of hoLayer5 to OLEexDoRotate
			Set ComSelectable of hoLayer5 to False
			Variant voBackground2
			Get ComBackground of hoLayer5 to voBackground2
			Handle hoBackground2
			Get Create (RefClass(cComBackground)) to hoBackground2
			Set pvComObject of hoBackground2 to voBackground2
				Variant voPicture2
				Get ComPicture of hoBackground2 to voPicture2
				Handle hoPicture2
				Get Create (RefClass(cComPicture)) to hoPicture2
				Set pvComObject of hoPicture2 to voPicture2
					Set ComName of hoPicture2 to "Minute.png"
				Send Destroy to hoPicture2
			Send Destroy to hoBackground2
			Set ComValueToRotateAngle of hoLayer5 to "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
			Set ComRotateAngleToValue of hoLayer5 to "value / 360 / 24 / 60"
		Send Destroy to hoLayer5
	Send Destroy to hoLayers6
	Variant voLayers7
	Get ComLayers to voLayers7
	Handle hoLayers7
	Get Create (RefClass(cComLayers)) to hoLayers7
	Set pvComObject of hoLayers7 to voLayers7
		Variant voLayer6
		Get ComItem of hoLayers7 3 to voLayer6
		Handle hoLayer6
		Get Create (RefClass(cComLayer)) to hoLayer6
		Set pvComObject of hoLayer6 to voLayer6
			Set ComPosition of hoLayer6 to 1
			Set ComKey of hoLayer6 to "hour"
			Set ComOnDrag of hoLayer6 to OLEexDoRotate
			Variant voBackground3
			Get ComBackground of hoLayer6 to voBackground3
			Handle hoBackground3
			Get Create (RefClass(cComBackground)) to hoBackground3
			Set pvComObject of hoBackground3 to voBackground3
				Variant voPicture3
				Get ComPicture of hoBackground3 to voPicture3
				Handle hoPicture3
				Get Create (RefClass(cComPicture)) to hoPicture3
				Set pvComObject of hoPicture3 to voPicture3
					Set ComName of hoPicture3 to "Hour.png"
				Send Destroy to hoPicture3
			Send Destroy to hoBackground3
			Set ComValueToRotateAngle of hoLayer6 to "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			Set ComRotateAngleToValue of hoLayer6 to "value / 360 * 0.5"
		Send Destroy to hoLayer6
	Send Destroy to hoLayers7
	Set ComLayerOfValue to 3
	Set ComValue to (ComFormatABC(Self,"date(`now`)",Nothing,Nothing,Nothing))
	Set ComTimerInterval to 1000
End_Procedure
23:
How can I clip as a triangle

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipPolygon
				Get ComPolygon of hoClip3 to voClipPolygon
				Handle hoClipPolygon
				Get Create (RefClass(cComClipPolygon)) to hoClipPolygon
				Set pvComObject of hoClipPolygon to voClipPolygon
					Set ComPoints of hoClipPolygon to 3
					Set ComX of hoClipPolygon 0 to 0
					Set ComY of hoClipPolygon 0 to "height"
					Set ComX of hoClipPolygon 1 to "width/2"
					Set ComY of hoClipPolygon 1 to "value/100*width"
					Set ComX of hoClipPolygon 2 to "width"
					Set ComY of hoClipPolygon 2 to "height"
					Set ComInverseClip of hoClipPolygon to True
				Send Destroy to hoClipPolygon
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
22:
How can I limit the rotation from 0 to 360 degree, while dragging
// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComRotateType of hoLayer to OLEexRotateBilinearInterpolation
			Set ComLeft of hoLayer to "(width-512)/2"
			Set ComTop of hoLayer to "(height-512)/2"
			Set ComHeight of hoLayer to 512
			Set ComWidth of hoLayer to 512
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Set ComRotateAngle of hoLayer to -45
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
21:
How can I clip as a pie

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = -1
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComLeft of hoLayer4 to "(width-128)/2"
			Set ComTop of hoLayer4 to "(height-128)/2"
			Set ComHeight of hoLayer4 to 128
			Set ComWidth of hoLayer4 to 128
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voColor
				Get ComColor of hoBackground to voColor
				Handle hoColor
				Get Create (RefClass(cComColor)) to hoColor
				Set pvComObject of hoColor to voColor
					Set ComValue of hoColor to (RGB(0,255,0))
				Send Destroy to hoColor
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipPie
				Get ComPie of hoClip3 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComInverseClip of hoClipPie to True
					Set ComStartAngle of hoClipPie to 0
					Set ComSweepAngle of hoClipPie to "value/100*360"
				Send Destroy to hoClipPie
				Set ComValue of hoClip3 to 15
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
20:
How can I use a picture to clip the layer

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers "Clip" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Variant v
					Variant voLayers1
					Get ComLayers to voLayers1
					Handle hoLayers1
					Get Create (RefClass(cComLayers)) to hoLayers1
					Set pvComObject of hoLayers1 to voLayers1
						Variant voLayer1
						Get ComItem of hoLayers1 "Thumb" to voLayer1
						Handle hoLayer1
						Get Create (RefClass(cComLayer)) to hoLayer1
						Set pvComObject of hoLayer1 to voLayer1
							Variant voLayer2
							Get ComItem of hoLayer1 "Thumb" to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Get ComRotateAngle of hoLayer2 to v
							Send Destroy to hoLayer2
						Send Destroy to hoLayer1
					Send Destroy to hoLayers1
				Set ComValue of hoClip to v
			Send Destroy to hoClip
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers2
	Get ComLayers to voLayers2
	Handle hoLayers2
	Get Create (RefClass(cComLayers)) to hoLayers2
	Set pvComObject of hoLayers2 to voLayers2
		Set ComCount of hoLayers2 to 5
	Send Destroy to hoLayers2
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Variant voLayer3
		Get ComItem of hoLayers3 4 to voLayer3
		Handle hoLayer3
		Get Create (RefClass(cComLayer)) to hoLayer3
		Set pvComObject of hoLayer3 to voLayer3
			Set ComKey of hoLayer3 to "Thumb"
			Set ComDefaultRotateAngle of hoLayer3 to -141
			Set ComOnDrag of hoLayer3 to OLEexDoRotate
			Set ComRotateType of hoLayer3 to OLEexRotateBilinearInterpolation
		Send Destroy to hoLayer3
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 1 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComKey of hoLayer4 to "Clip"
			Variant voClip1
			Get ComClip of hoLayer4 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant voClipPie
				Get ComPie of hoClip1 to voClipPie
				Handle hoClipPie
				Get Create (RefClass(cComClipPie)) to hoClipPie
				Set pvComObject of hoClipPie to voClipPie
					Set ComSweepAngle of hoClipPie to "value"
				Send Destroy to hoClipPie
				Variant voClipPicture
				Get ComPicture of hoClip1 to voClipPicture
				Handle hoClipPicture
				Get Create (RefClass(cComClipPicture)) to hoClipPicture
				Set pvComObject of hoClipPicture to voClipPicture
					Variant v1
						Variant voLayers5
						Get ComLayers to voLayers5
						Handle hoLayers5
						Get Create (RefClass(cComLayers)) to hoLayers5
						Set pvComObject of hoLayers5 to voLayers5
							Variant voLayer5
							Get ComItem of hoLayers5 "Clip" to voLayer5
							Handle hoLayer5
							Get Create (RefClass(cComLayer)) to hoLayer5
							Set pvComObject of hoLayer5 to voLayer5
								Variant voLayer6
								Get ComItem of hoLayer5 "Clip" to voLayer6
								Handle hoLayer6
								Get Create (RefClass(cComLayer)) to hoLayer6
								Set pvComObject of hoLayer6 to voLayer6
									Variant voBackground
									Get ComBackground of hoLayer6 to voBackground
									Handle hoBackground
									Get Create (RefClass(cComBackground)) to hoBackground
									Set pvComObject of hoBackground to voBackground
										Variant voPicture
										Get ComPicture of hoBackground to voPicture
										Handle hoPicture
										Get Create (RefClass(cComPicture)) to hoPicture
										Set pvComObject of hoPicture to voPicture
											Get ComName of hoPicture to v1
										Send Destroy to hoPicture
									Send Destroy to hoBackground
								Send Destroy to hoLayer6
							Send Destroy to hoLayer5
						Send Destroy to hoLayers5
					Set ComName of hoClipPicture to v1
					Set ComAlphaTo of hoClipPicture to "128"
				Send Destroy to hoClipPicture
			Send Destroy to hoClip1
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
	Variant voLayers6
	Get ComLayers to voLayers6
	Handle hoLayers6
	Get Create (RefClass(cComLayers)) to hoLayers6
	Set pvComObject of hoLayers6 to voLayers6
		Variant voLayer7
		Get ComItem of hoLayers6 "Thumb" to voLayer7
		Handle hoLayer7
		Get Create (RefClass(cComLayer)) to hoLayer7
		Set pvComObject of hoLayer7 to voLayer7
			Set ComRotateAngle of hoLayer7 to 90
		Send Destroy to hoLayer7
	Send Destroy to hoLayers6
	Send ComEndUpdate
End_Procedure
19:
How do I clip a circle/ellipse

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComLeft of hoLayer4 to "(width-128)/2"
			Set ComTop of hoLayer4 to "(height-128)/2"
			Set ComHeight of hoLayer4 to 128
			Set ComWidth of hoLayer4 to 128
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voColor
				Get ComColor of hoBackground to voColor
				Handle hoColor
				Get Create (RefClass(cComColor)) to hoColor
				Set pvComObject of hoColor to voColor
					Set ComValue of hoColor to (RGB(0,255,0))
				Send Destroy to hoColor
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipEllipse
				Get ComEllipse of hoClip3 to voClipEllipse
				Handle hoClipEllipse
				Get Create (RefClass(cComClipEllipse)) to hoClipEllipse
				Set pvComObject of hoClipEllipse to voClipEllipse
					Set ComRadiusX of hoClipEllipse to "value/100 * width"
				Send Destroy to hoClipEllipse
				Set ComValue of hoClip3 to 25
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
18:
What InverseClip does

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComLeft of hoLayer4 to "(width-128)/2"
			Set ComTop of hoLayer4 to "(height-128)/2"
			Set ComHeight of hoLayer4 to 128
			Set ComWidth of hoLayer4 to 128
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voColor
				Get ComColor of hoBackground to voColor
				Handle hoColor
				Get Create (RefClass(cComColor)) to hoColor
				Set pvComObject of hoColor to voColor
					Set ComValue of hoColor to (RGB(0,255,0))
				Send Destroy to hoColor
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRoundRectangle
				Get ComRoundRectangle of hoClip3 to voClipRoundRectangle
				Handle hoClipRoundRectangle
				Get Create (RefClass(cComClipRoundRectangle)) to hoClipRoundRectangle
				Set pvComObject of hoClipRoundRectangle to voClipRoundRectangle
					Set ComWidth of hoClipRoundRectangle to "value/100 * width"
					Set ComRoundRadiusX of hoClipRoundRectangle to "width/8"
					Set ComRoundRadiusY of hoClipRoundRectangle to "height/8"
					Set ComInverseClip of hoClipRoundRectangle to True
				Send Destroy to hoClipRoundRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
17:
How do I clip as rectangle (round), from left to right

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Set ComLeft of hoLayer4 to "(width-128)/2"
			Set ComTop of hoLayer4 to "(height-128)/2"
			Set ComHeight of hoLayer4 to 128
			Set ComWidth of hoLayer4 to 128
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voColor
				Get ComColor of hoBackground to voColor
				Handle hoColor
				Get Create (RefClass(cComColor)) to hoColor
				Set pvComObject of hoColor to voColor
					Set ComValue of hoColor to (RGB(0,255,0))
				Send Destroy to hoColor
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRoundRectangle
				Get ComRoundRectangle of hoClip3 to voClipRoundRectangle
				Handle hoClipRoundRectangle
				Get Create (RefClass(cComClipRoundRectangle)) to hoClipRoundRectangle
				Set pvComObject of hoClipRoundRectangle to voClipRoundRectangle
					Set ComWidth of hoClipRoundRectangle to "value/100 * width"
					Set ComRoundRadiusX of hoClipRoundRectangle to "width/8"
					Set ComRoundRadiusY of hoClipRoundRectangle to "height/8"
				Send Destroy to hoClipRoundRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
16:
How do I clip as rectangle, from bottom to top

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRectangle
				Get ComRectangle of hoClip3 to voClipRectangle
				Handle hoClipRectangle
				Get Create (RefClass(cComClipRectangle)) to hoClipRectangle
				Set pvComObject of hoClipRectangle to voClipRectangle
					Set ComHeight of hoClipRectangle to "value/100 * height"
					Set ComInverseClip of hoClipRectangle to True
				Send Destroy to hoClipRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
15:
How do I clip as rectangle, from top to bottom

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRectangle
				Get ComRectangle of hoClip3 to voClipRectangle
				Handle hoClipRectangle
				Get Create (RefClass(cComClipRectangle)) to hoClipRectangle
				Set pvComObject of hoClipRectangle to voClipRectangle
					Set ComHeight of hoClipRectangle to "value/100 * height"
				Send Destroy to hoClipRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
14:
How do I clip as rectangle, from right to left

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRectangle
				Get ComRectangle of hoClip3 to voClipRectangle
				Handle hoClipRectangle
				Get Create (RefClass(cComClipRectangle)) to hoClipRectangle
				Set pvComObject of hoClipRectangle to voClipRectangle
					Set ComWidth of hoClipRectangle to "value/100 * width"
					Set ComInverseClip of hoClipRectangle to True
				Send Destroy to hoClipRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
13:
How do I clip as rectangle, from left to right

// Notifies that the user drags the layer.
Procedure OnComDrag Variant   llDragInfo
	Forward Send OnComDrag llDragInfo
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug= 287
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant v
			Variant voClip
			Get ComClip of hoLayer to voClip
			Handle hoClip
			Get Create (RefClass(cComClip)) to hoClip
			Set pvComObject of hoClip to voClip
				Get ComValue of hoClip to v
			Send Destroy to hoClip
			Set ComUserData of hoLayer to v
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure

// Occurs when the mouse wheel moves while the control has focus
Procedure OnComMouseWheel Integer   llDelta
	Forward Send OnComMouseWheel llDelta
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComItem of hoLayers1 0 to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voClip1
			Get ComClip of hoLayer1 to voClip1
			Handle hoClip1
			Get Create (RefClass(cComClip)) to hoClip1
			Set pvComObject of hoClip1 to voClip1
				Variant v1
					Variant vA
						Variant voLayers2
						Get ComLayers to voLayers2
						Handle hoLayers2
						Get Create (RefClass(cComLayers)) to hoLayers2
						Set pvComObject of hoLayers2 to voLayers2
							Variant voLayer2
							Get ComItem of hoLayers2 0 to voLayer2
							Handle hoLayer2
							Get Create (RefClass(cComLayer)) to hoLayer2
							Set pvComObject of hoLayer2 to voLayer2
								Variant voLayer3
								Get ComItem of hoLayer2 0 to voLayer3
								Handle hoLayer3
								Get Create (RefClass(cComLayer)) to hoLayer3
								Set pvComObject of hoLayer3 to voLayer3
									Variant voClip2
									Get ComClip of hoLayer3 to voClip2
									Handle hoClip2
									Get Create (RefClass(cComClip)) to hoClip2
									Set pvComObject of hoClip2 to voClip2
										Get ComValue of hoClip2 to vA
									Send Destroy to hoClip2
								Send Destroy to hoLayer3
							Send Destroy to hoLayer2
						Send Destroy to hoLayers2
					Get ComFormatABC "(value + B) MIN 0 MAX 100" vA llDelta Nothing to v1
				Set ComValue of hoClip1 to v1
			Send Destroy to hoClip1
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers3
	Get ComLayers to voLayers3
	Handle hoLayers3
	Get Create (RefClass(cComLayers)) to hoLayers3
	Set pvComObject of hoLayers3 to voLayers3
		Set ComCount of hoLayers3 to 1
	Send Destroy to hoLayers3
	Variant voLayers4
	Get ComLayers to voLayers4
	Handle hoLayers4
	Get Create (RefClass(cComLayers)) to hoLayers4
	Set pvComObject of hoLayers4 to voLayers4
		Variant voLayer4
		Get ComItem of hoLayers4 0 to voLayer4
		Handle hoLayer4
		Get Create (RefClass(cComLayer)) to hoLayer4
		Set pvComObject of hoLayer4 to voLayer4
			Variant voBackground
			Get ComBackground of hoLayer4 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Variant voClip3
			Get ComClip of hoLayer4 to voClip3
			Handle hoClip3
			Get Create (RefClass(cComClip)) to hoClip3
			Set pvComObject of hoClip3 to voClip3
				Variant voClipRectangle
				Get ComRectangle of hoClip3 to voClipRectangle
				Handle hoClipRectangle
				Get Create (RefClass(cComClipRectangle)) to hoClipRectangle
				Set pvComObject of hoClipRectangle to voClipRectangle
					Set ComWidth of hoClipRectangle to "value/100 * width"
				Send Destroy to hoClipRectangle
				Set ComValue of hoClip3 to 50
			Send Destroy to hoClip3
		Send Destroy to hoLayer4
	Send Destroy to hoLayers4
End_Procedure
12:
How can I associate a value to rotation angle

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"`Value: <b>` + (value format ``) ",vA,Nothing,Nothing))
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "back" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComRotateType of hoLayer1 to OLEexRotateBilinearInterpolation
			Set ComLeft of hoLayer1 to "(width-512)/2"
			Set ComTop of hoLayer1 to "(height-512)/2"
			Set ComHeight of hoLayer1 to 512
			Set ComWidth of hoLayer1 to 512
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer1 to OLEexDoRotate
			Set ComDefaultRotateAngle of hoLayer1 to 45
			Set ComRotateCenterY of hoLayer1 to "lheight/2 + 32"
			Set ComRotateCenterX of hoLayer1 to "lwidth/2 + 32"
			Set ComRotateAngleToValue of hoLayer1 to "value/360 * 100"
			Set ComValueToRotateAngle of hoLayer1 to "value / 100 * 360"
			Set ComValue of hoLayer1 to 50
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure
11:
How can I associate a value to vertical offset

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"`Value: <b>` + (value format ``)",vA,Nothing,Nothing))
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 287
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "back" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer1 to OLEexDoMove
			Set ComDefaultOffsetY of hoLayer1 to -100
			Set ComOffsetYValid of hoLayer1 to "value MIN 0 MAX 200"
			Set ComOffsetXValid of hoLayer1 to 0
			Set ComOffsetToValue of hoLayer1 to "offsety /200 * 100"
			Set ComValueToOffsetY of hoLayer1 to "value / 100 * 200"
			Set ComValue of hoLayer1 to 50
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure
10:
How can I associate a value to horizontal offset

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComValue of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"`Value: <b>` + (value format ``)",vA,Nothing,Nothing))
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 287
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "back" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer1 to OLEexDoMove
			Set ComDefaultOffsetX of hoLayer1 to -100
			Set ComOffsetXValid of hoLayer1 to "value MIN 0 MAX 200"
			Set ComOffsetYValid of hoLayer1 to 0
			Set ComOffsetToValue of hoLayer1 to "offsetx /200 * 100"
			Set ComValueToOffsetX of hoLayer1 to "value / 100 * 200"
			Set ComValue of hoLayer1 to 50
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure
9:
How can I display the current angle

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComRotateAngle of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"`Angle: <b>` + (value format ``) + ``",vA,Nothing,Nothing))
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "back" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComRotateType of hoLayer1 to OLEexRotateBilinearInterpolation
			Set ComLeft of hoLayer1 to "(width-512)/2"
			Set ComTop of hoLayer1 to "(height-512)/2"
			Set ComHeight of hoLayer1 to 512
			Set ComWidth of hoLayer1 to 512
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer1 to OLEexDoRotate
			Set ComRotateAngleValid of hoLayer1 to "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure
8:
How can I limit the rotation angle

// Occurs when the layer's value is changed.
Procedure OnComChange Integer   llLayer
	Forward Send OnComChange llLayer
	Variant vA
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComItem of hoLayers 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Get ComRotateAngle of hoLayer to vA
		Send Destroy to hoLayer
	Send Destroy to hoLayers
	Set ComCaption OLEexLayerCaption to (ComFormatABC(Self,"`Angle: <b>` + (value format ``) + ``",vA,Nothing,Nothing))
End_Procedure

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer1
		Get ComAdd of hoLayers1 "back" to voLayer1
		Handle hoLayer1
		Get Create (RefClass(cComLayer)) to hoLayer1
		Set pvComObject of hoLayer1 to voLayer1
			Set ComRotateType of hoLayer1 to OLEexRotateBilinearInterpolation
			Set ComLeft of hoLayer1 to "(width-512)/2"
			Set ComTop of hoLayer1 to "(height-512)/2"
			Set ComHeight of hoLayer1 to 512
			Set ComWidth of hoLayer1 to 512
			Variant voBackground
			Get ComBackground of hoLayer1 to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer1 to OLEexDoRotate
			Set ComRotateAngleValid of hoLayer1 to "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"
		Send Destroy to hoLayer1
	Send Destroy to hoLayers1
End_Procedure
7:
Can I specify a different center while rotating

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComRotateType of hoLayer to OLEexRotateBilinearInterpolation
			Set ComLeft of hoLayer to "(width-512)/2"
			Set ComTop of hoLayer to "(height-512)/2"
			Set ComHeight of hoLayer to 512
			Set ComWidth of hoLayer to 512
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Set ComRotateAngle of hoLayer to -45
			Set ComRotateCenterY of hoLayer to "lheight/2 + 32"
			Set ComRotateCenterX of hoLayer to "lwidth/2 + 32"
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
6:
How can I rotate a layer, without cutting off the picture

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Set ComLeft of hoLayer to "(width-512)/2"
			Set ComTop of hoLayer to "(height-512)/2"
			Set ComHeight of hoLayer to 512
			Set ComWidth of hoLayer to 512
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComLeft of hoPicture to "(width-pwidth)/2"
					Set ComTop of hoPicture to "(height-pheight)/2"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Set ComRotateAngle of hoLayer to -45
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
5:
How can I rotate a layer

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 483
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
					Set ComWidth of hoPicture to "pwidth"
					Set ComHeight of hoPicture to "pheight"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoRotate
			Set ComRotateAngle of hoLayer to 45
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
4:
Is there any way to debug the layer while moving

// Occurs once the user starts dragging a layer.
Procedure OnComDragStart Variant   llDragInfo Boolean   llCancel
	Forward Send OnComDragStart llDragInfo llCancel
	// DragInfo.Debug = 287
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoMove
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
3:
How do I specify where to move the layer, while dragging
Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoMove
			Set ComOffsetXValid of hoLayer to "int(value / 64) * 64"
			Set ComOffsetYValid of hoLayer to "int(value / 64) * 64"
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
2:
How can I add layers to the control
Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Variant voLayer
		Get ComAdd of hoLayers "back" to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoMove
		Send Destroy to hoLayer
	Send Destroy to hoLayers
End_Procedure
1:
How can I add layers to the control
Procedure OnCreate
	Forward Send OnCreate
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 1
	Send Destroy to hoLayers
	Variant voLayers1
	Get ComLayers to voLayers1
	Handle hoLayers1
	Get Create (RefClass(cComLayers)) to hoLayers1
	Set pvComObject of hoLayers1 to voLayers1
		Variant voLayer
		Get ComItem of hoLayers1 0 to voLayer
		Handle hoLayer
		Get Create (RefClass(cComLayer)) to hoLayer
		Set pvComObject of hoLayer to voLayer
			Variant voBackground
			Get ComBackground of hoLayer to voBackground
			Handle hoBackground
			Get Create (RefClass(cComBackground)) to hoBackground
			Set pvComObject of hoBackground to voBackground
				Variant voPicture
				Get ComPicture of hoBackground to voPicture
				Handle hoPicture
				Get Create (RefClass(cComPicture)) to hoPicture
				Set pvComObject of hoPicture to voPicture
					Set ComValue of hoPicture to "c:\exontrol\images\card.png"
				Send Destroy to hoPicture
			Send Destroy to hoBackground
			Set ComOnDrag of hoLayer to OLEexDoMove
		Send Destroy to hoLayer
	Send Destroy to hoLayers1
End_Procedure