64
ImageSize property on 32 (specifies the size of the control' icons)


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ImageSize := 32
oDCOCX_Exontrol1:Font:Size := 16
oDCOCX_Exontrol1:Images("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")
oDCOCX_Exontrol1:[Caption,exLayerCaption] := "<img>1</img>Caption"
oDCOCX_Exontrol1:EndUpdate()

63
ImageSize property on 16 (default) (specifies the size of the control' icons)


oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ImageSize := 16
oDCOCX_Exontrol1:Images("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8acvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTGsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPnwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==")
oDCOCX_Exontrol1:[Caption,exLayerCaption] := "<img>1</img>Caption"
oDCOCX_Exontrol1:EndUpdate()

62
I found that the control's needle/knob is too small to touch, is it possible somehow to make it working
local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:LayerAutoSize := -1
oDCOCX_Exontrol1:Layers:Count := 10
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:Idem := "0,7"
oDCOCX_Exontrol1:LayerDragAny := 9
oDCOCX_Exontrol1:EndUpdate()

61
How can I rotate/move multiple layers once the user drags the layer

local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:LayerAutoSize := -1
oDCOCX_Exontrol1:Layers:Count := 10
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:Idem := "0,7"
oDCOCX_Exontrol1:EndUpdate()

60
How can I show a layer as disabled

local var_Layer,var_Layer1,var_Layer2 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
var_Layer := oDCOCX_Exontrol1:Layers:Add("original")
	var_Layer:OnDrag := exDoMove
	var_Layer:Background:Picture:Name := "Layer2.png"
	var_Layer:DefaultOffsetY := -164
	var_Layer:Grayscale := 0
var_Layer1 := oDCOCX_Exontrol1:Layers:Add("grayscale 50%")
	var_Layer1:Background:Picture:Name := "Layer2.png"
	var_Layer1:Grayscale := 50
	var_Layer1:DefaultOffsetY := -82
var_Layer2 := oDCOCX_Exontrol1:Layers:Add("grayscale 100%")
	var_Layer2:Background:Picture:Name := "Layer2.png"
	var_Layer2:Grayscale := 100
oDCOCX_Exontrol1:EndUpdate()

59
Is it possible to stretch all layers

local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
oDCOCX_Exontrol1:PicturesName := "`Layer` + int(value  + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 5
var_Layer := oDCOCX_Exontrol1:Layers:Add("empty")
	var_Layer:Background:Color:Value := RGB(240,240,240)
	var_Layer:Position := 0
oDCOCX_Exontrol1:LayerAutoSize := -1
oDCOCX_Exontrol1:EndUpdate()

58
Tic Tac Toe Game

METHOD OCX_Exontrol1MouseDown(Button,Shift,X,Y) CLASS MainDialog
	// MouseDown event - Occurs when the user presses a mouse button.
	// Left = Me.Layers(l).Left
	// Top = Me.Layers(l).Top
	// Width = Me.Layers(l).Width
	// Height = Me.Layers(l).Height
	local var_Picture as ILPicture
	local var_Layer as ILayer
	local var_Layers as ILayers
	local l as USUAL
	l := oDCOCX_Exontrol1:[LayerFromPoint,-1,-1]
	var_Layers := oDCOCX_Exontrol1:Layers
		var_Layer := var_Layers:Add(oDCOCX_Exontrol1:Layers:Count)
			var_Picture := var_Layer:Background:Picture
				var_Picture:Left := "8"
				var_Picture:Width := "width - 2 * 8"
				var_Picture:Top := "8"
				var_Picture:Height := "height - 2 * 8"
				var_Picture:Name := oDCOCX_Exontrol1:FormatABC("A mod 2 = 0 ? `x` : `o`",oDCOCX_Exontrol1:Layers:Count,nil,nil)
			var_Layer:Transparency := 0
RETURN NIL

local var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8 as ILayer

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

57
What's the difference Rotate vs Rotamove

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 227

RETURN NIL

local var_Foreground,var_Foreground1 as IForeground
local var_Picture,var_Picture1 as ILPicture
local var_Layer,var_Layer1,var_Layer2 as ILayer
local var_Layers as ILayers

oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Button with LEDs"
var_Layers := oDCOCX_Exontrol1:Layers
	var_Layer := var_Layers:Add("base")
	var_Layer1 := var_Layers:Add("rotate")
		var_Layer1:ToolTip := AsString(var_Layer1:Key)
		var_Picture := var_Layer1:Background:Picture
			var_Picture:Name := "Example Button Up.png"
			var_Picture:Left := "width/2"
			var_Picture:Top := "height/2"
			var_Picture:Width := AsString(128)
			var_Picture:Height := AsString(64)
		var_Foreground := var_Layer1:Foreground
			var_Foreground:[Caption,exLayerCaption] := "<font ;14><sha ;;0>Rotate"
			var_Foreground:[Caption,exLayerCaptionLeft] := "width/2 + 32"
			var_Foreground:[Caption,exLayerCaptionTop] := "height/2 + 16"
		var_Layer1:[Brightness,exRedChannel] := 100
		var_Layer1:OnDrag := exDoRotate
		var_Layer1:RotateAngle := 45
	var_Layer2 := var_Layers:Add("rotamove")
		var_Layer2:ToolTip := AsString(var_Layer2:Key)
		var_Picture1 := var_Layer2:Background:Picture
			var_Picture1:Name := "Example Button Up.png"
			var_Picture1:Left := "width/2"
			var_Picture1:Top := "height/2"
			var_Picture1:Width := AsString(128)
			var_Picture1:Height := AsString(64)
		var_Foreground1 := var_Layer2:Foreground
			var_Foreground1:[Caption,exLayerCaption] := "<font ;14><sha ;;0>Rotamove"
			var_Foreground1:[Caption,exLayerCaptionLeft] := "width/2 + 24"
			var_Foreground1:[Caption,exLayerCaptionTop] := "height/2 + 16"
		var_Layer2:[Brightness,exGreenChannel] := 100
		var_Layer2:RotateAngle := 45
		var_Layer2:Transparency := 25
		var_Layer2:OnDrag := exDoRotamove

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

METHOD OCX_Exontrol1MouseIn(Layer) CLASS MainDialog
	// MouseIn event - Notifies that the cursor enters the layer.
	oDCOCX_Exontrol1:Layers:[Item,9]:ToolTip := AsString(oDCOCX_Exontrol1:FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oDCOCX_Exontrol1:Value,nil,nil))
RETURN NIL

local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 10
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:DefaultRotateAngle := -126
	var_Layer:OnDrag := exDoRotamove
	var_Layer:RotateAngleToValue := "100 - value / 360 * 100"
	var_Layer:ValueToRotateAngle := "(value)/100 * 360"
oDCOCX_Exontrol1:Layers:[Item,3]:Visible := false
oDCOCX_Exontrol1:Layers:[Item,4]:Visible := false
oDCOCX_Exontrol1:Layers:[Item,9]:Value := 25
oDCOCX_Exontrol1:EndUpdate()

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Layers(DragInfo.Layer).Clip.Ellipse

RETURN NIL

local var_ClipEllipse as IClipEllipse
local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColor := RGB(217,217,217)
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
var_Layer := oDCOCX_Exontrol1:Layers:Add("background")
	var_Layer:Background:Picture:Name := "Guage_Background.png"
	var_ClipEllipse := var_Layer:Clip:Ellipse
		var_ClipEllipse:RadiusX := "width/3"
		var_ClipEllipse:RadiusY := "height/3"
oDCOCX_Exontrol1:Layers:Add("needle"):Background:Picture:Name := "Guage_Needle.png"
oDCOCX_Exontrol1:EndUpdate()

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	local var_Layer as ILayer
	oDCOCX_Exontrol1:Layers:[Item,"Color"]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:RotateAngle
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,"Color"]
		var_Layer:[Brightness,exBlueChannel] := var_Layer:RotateAngle
	oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:[Brightness,exBlueChannel] := oDCOCX_Exontrol1:Layers:[Item,"Color"]:RotateAngle
RETURN NIL

local var_ClipEllipse as IClipEllipse
local var_Layer,var_Layer1 as ILayer

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

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	local var_Layer as ILayer
	oDCOCX_Exontrol1:Layers:[Item,"Color"]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:RotateAngle
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,"Color"]
		var_Layer:[Brightness,exBlueChannel] := var_Layer:RotateAngle
	oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:[Brightness,exBlueChannel] := oDCOCX_Exontrol1:Layers:[Item,"Color"]:RotateAngle
RETURN NIL

local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oDCOCX_Exontrol1:PicturesName := "`Layer` + int(value  + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 5
oDCOCX_Exontrol1:Layers:[Item,1]:Visible := false
var_Layer := oDCOCX_Exontrol1:Layers:[Item,4]
	var_Layer:Key := "Thumb"
	var_Layer:DefaultRotateAngle := -141
	var_Layer:OnDrag := exDoRotate
	var_Layer:RotateType := exRotateBilinearInterpolation
	var_Layer:[Brightness,exAllChannels] := 0
	var_Layer:[Brightness,exGreenChannel] := 100
var_Layer1 := oDCOCX_Exontrol1:Layers:Add("Color")
	var_Layer1:OnDrag := exDoRotate
	var_Layer1:Position := 3
	var_Layer1:[Brightness,exAllChannels] := 0
	var_Layer1:[Brightness,exGreenChannel] := 100
	var_Layer1:Background:Picture:Name := "Layer3.png"
	var_Layer1:Clip:Pie:SweepAngle := "value"
oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:RotateAngle := 135
oDCOCX_Exontrol1:EndUpdate()

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

local var_ClipPicture as IClipPicture
local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
var_Layer := oDCOCX_Exontrol1:Layers:Add("default")
	var_Layer:OnDrag := exDoMove
	var_Layer:Background:Picture:Name := "Layer2.png"
	var_Layer:DefaultOffsetY := -164
var_Layer1 := oDCOCX_Exontrol1:Layers:Add("notransparency")
	var_Layer1:OnDrag := exDoMove
	var_Layer1:Background:Picture:Name := "Layer2.png"
	var_ClipPicture := var_Layer1:Clip:Picture
		var_ClipPicture:Name := oDCOCX_Exontrol1:Layers:[Item,"notransparency"]:Background:Picture:Name
		var_ClipPicture:AlphaTo := "128"
	var_Layer1:Grayscale := 100
oDCOCX_Exontrol1:EndUpdate()

51
How can I resize all layers

local var_Layer as ILayer

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

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

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

RETURN NIL


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

49
How can I prevent dragging the layers when user right click it
METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// Cancel = Me.FormatABC("A=2",DragInfo.Button)

RETURN NIL


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

48
Is your control DPI-Aware

local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerRotateType] := 2
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:Layers:[Item,3]:Grayscale := 100
oDCOCX_Exontrol1:Layers:[Item,4]:Grayscale := 100
var_Layer := oDCOCX_Exontrol1:Layers:[Item,10]
	var_Layer:Width := "128 * dpix"
	var_Layer:Height := "128 * dpiy"
oDCOCX_Exontrol1:Layers:[Item,9]:OnDrag := exDoRotate
oDCOCX_Exontrol1:LayerAutoSize := 10

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

local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 10
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:RotateType := exRotateBilinearInterpolation
	var_Layer:OnDrag := exDoRotate
oDCOCX_Exontrol1:AllowMoveOnClick := true
oDCOCX_Exontrol1:LayerUpdate := exLayerUpdateScreen

46
How can I show the layers on perspective


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

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

local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerRotateType] := 2
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:Layers:[Item,3]:Grayscale := 100
oDCOCX_Exontrol1:Layers:[Item,4]:Grayscale := 100
oDCOCX_Exontrol1:Layers:[Item,9]:OnDrag := exDoRotate
var_Layer := oDCOCX_Exontrol1:Layers:[Item,10]
	var_Layer:Width := AsString(128)
	var_Layer:Height := AsString(128)
oDCOCX_Exontrol1:LayerAutoSize := 10

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


oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerRotateType] := 2
oDCOCX_Exontrol1:Layers:Count := 10
oDCOCX_Exontrol1:Layers:[Item,3]:Grayscale := 100
oDCOCX_Exontrol1:Layers:[Item,4]:Grayscale := 100
oDCOCX_Exontrol1:LayerAutoSize := -1

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

local var_Picture as ILPicture
local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 12
oDCOCX_Exontrol1:Layers:[Item,0]:Background:Picture:Name := "\..\Clock\vista_clock.png"
oDCOCX_Exontrol1:Layers:[Item,9]:Background:Picture:Name := "\..\Knob 2\Layer3.png"
oDCOCX_Exontrol1:Layers:[Item,10]:Background:Picture:Name := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noBack.png"
var_Layer := oDCOCX_Exontrol1:Layers:[Item,11]
	var_Layer:DefaultOffsetX := 64
	var_Layer:DefaultOffsetY := -36
	var_Picture := var_Layer:Background:Picture
		var_Picture:Name := "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"
		var_Picture:Width := AsString(64)
		var_Picture:Height := AsString(64)

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

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:[LayerFromPoint,-1,-1]) ))
RETURN NIL

local var_Foreground,var_Foreground1 as IForeground
local var_Picture,var_Picture1 as ILPicture
local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 12
var_Layer := oDCOCX_Exontrol1:Layers:[Item,10]
	var_Layer:RotateType := exRotateBilinearInterpolation
	var_Layer:OnDrag := exDoRotate
	var_Picture := var_Layer:Background:[ExtraPicture,"extra1"]
		var_Picture:Name := "Layer1.png"
		var_Picture:Left := "32"
		var_Picture:Top := "32"
		var_Picture:Width := AsString(64)
		var_Picture:Height := AsString(64)
	var_Foreground := var_Layer:Foreground
		var_Foreground:[Caption,exLayerCaption] := "<sha ;;0>selectable"
		var_Foreground:[Caption,exLayerCaptionLeft] := 38
		var_Foreground:[Caption,exLayerCaptionTop] := -5
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,11]
	var_Picture1 := var_Layer1:Background:[ExtraPicture,"extra2"]
		var_Picture1:Name := "Layer1.png"
		var_Picture1:Left := "width-64"
		var_Picture1:Top := "height-84 - 32"
		var_Picture1:Width := AsString(64)
		var_Picture1:Height := AsString(64)
		var_Picture1:Selectable := false
	var_Layer1:[Brightness,exAllChannels] := 25
	var_Foreground1 := var_Layer1:Foreground
		var_Foreground1:[Caption,exLayerCaption] := "<sha ;;0>not selectable"
		var_Foreground1:[Caption,exLayerCaptionAnchor] := 8
		var_Foreground1:[Caption,exLayerCaptionTop] := "height-theight/4"
oDCOCX_Exontrol1:EndUpdate()

41
How do I get the layer/object/picture from the cursor
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:[LayerFromPoint,-1,-1]) ))
RETURN NIL

local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 10
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:RotateType := exRotateBilinearInterpolation
	var_Layer:OnDrag := exDoRotate

40
How can I display a speedometer

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"arc"]:Clip:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"noDigit"]:Background:[ExtraPicture,"80"]:Name := oDCOCX_Exontrol1:FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,"noDigit"]:Background:[ExtraPicture,"08"]:Name := oDCOCX_Exontrol1:FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",oDCOCX_Exontrol1:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value + B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_ClipPie,var_ClipPie1 as IClipPie
local var_Picture,var_Picture1,var_Picture2,var_Picture3 as ILPicture
local var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5 as ILayer

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

39
How can I display LED-numbers

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value MIN 0 MAX 99",:Value,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,"noDigit"]:Background:[ExtraPicture,"80"]:Name := oDCOCX_Exontrol1:FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,"noDigit"]:Background:[ExtraPicture,"08"]:Name := oDCOCX_Exontrol1:FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",oDCOCX_Exontrol1:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value + B",oDCOCX_Exontrol1:Layers:[Item,"noDigit"]:Value,Delta,nil)
RETURN NIL

METHOD OCX_Exontrol1Timer(TickCount) CLASS MainDialog
	// Timer event - Occurs when the interval elapses.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value = 99 ? 0 : ( value  + B )",oDCOCX_Exontrol1:Value,1,nil)
RETURN NIL

local var_Picture,var_Picture1,var_Picture2,var_Picture3 as ILPicture
local var_Layer,var_Layer1 as ILayer

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

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

local var_Layer as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:LayerAutoSize := -1
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerWidth] := "width MAX height"
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerHeight] := "width MAX height"
oDCOCX_Exontrol1:Layers:Count := 5
var_Layer := oDCOCX_Exontrol1:Layers:[Item,4]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:DefaultRotateAngle := -142

37
How can I display a switch

METHOD OCX_Exontrol1Click() CLASS MainDialog
	// Click event - Occurs when the user presses and then releases the left mouse button over the control.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("(value + 1) mod 2",:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragEnd(DragInfo,Cancel) CLASS MainDialog
	// DragEnd event - Occurs once the user ends dragging a layer.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("(value < 24 ? 0 : 1)",oDCOCX_Exontrol1:Layers:[Item,"knob"]:OffsetX,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value > 0 ? 1 : 0",Delta,nil,nil)
RETURN NIL

local var_Picture,var_Picture1,var_Picture2 as ILPicture
local var_Layer,var_Layer1,var_Layer2 as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch"
oDCOCX_Exontrol1:Layers:Count := 4
oDCOCX_Exontrol1:Layers:[Item,0]:Background:Picture:Name := "background.png"
var_Layer := oDCOCX_Exontrol1:Layers:[Item,1]
	var_Picture := var_Layer:Background:Picture
		var_Picture:Name := "Indicator_ON.png"
		var_Picture:DisplayAs := MiddleLeft
	var_Layer:OffsetXValid := AsString(48)
	var_Layer:OffsetYValid := AsString(0)
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,2]
	var_Picture1 := var_Layer1:Background:Picture
		var_Picture1:Name := "Indicator_OFF.png"
		var_Picture1:DisplayAs := MiddleRight
	var_Layer1:OffsetXValid := AsString(-12)
	var_Layer1:OffsetYValid := AsString(0)
var_Layer2 := oDCOCX_Exontrol1:Layers:[Item,3]
	var_Layer2:OnDrag := exDoMove
	var_Layer2:Key := "knob"
	var_Picture2 := var_Layer2:Background:Picture
		var_Picture2:Name := "knob.png"
		var_Picture2:DisplayAs := MiddleCenter
	var_Layer2:DefaultOffsetY := "9"
	var_Layer2:DefaultOffsetX := "-5"
	var_Layer2:OffsetYValid := "0"
	var_Layer2:ValueToOffsetX := "value = 0 ? 0 : 48"
	var_Layer2:OffsetToValue := "value = 0 ? 0 : 1"
	var_Layer2:OffsetXValid := "(value MIN 0 MAX 48)"
oDCOCX_Exontrol1:LayerOfValue := oDCOCX_Exontrol1:Layers:[Item,"knob"]:Index
oDCOCX_Exontrol1:Value := 1

36
How can I colorize the layer

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,4]:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1Click() CLASS MainDialog
	// Click event - Occurs when the user presses and then releases the left mouse button over the control.
	local var_Object as USUAL
	var_Object := oDCOCX_Exontrol1:Layers:[Item,oDCOCX_Exontrol1:[LayerFromPoint,-1,-1]]
RETURN NIL

METHOD OCX_Exontrol1MouseIn(Layer) CLASS MainDialog
	// MouseIn event - Notifies that the cursor enters the layer.
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,Layer]
		var_Layer:[Brightness,exRedChannel] := 100
		var_Layer:[Brightness,exGreenChannel] := 0
		var_Layer:[Brightness,exBlueChannel] := 0
RETURN NIL

METHOD OCX_Exontrol1MouseOut(Layer) CLASS MainDialog
	// MouseOut event - Notifies that the cursor exits the layer.
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,Layer]
		var_Layer:[Brightness,exRedChannel] := oDCOCX_Exontrol1:[DefaultLayer,exDefLayerBrightness]
		var_Layer:[Brightness,exGreenChannel] := oDCOCX_Exontrol1:[DefaultLayer,exDefLayerBrightness]
		var_Layer:[Brightness,exBlueChannel] := oDCOCX_Exontrol1:[DefaultLayer,exDefLayerBrightness]
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - B",:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1 as ILayer

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

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,4]:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - B",:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1 as ILayer

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

34
How can I rotate more knobs at once

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,4]:Value,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,2]:RotateAngle := oDCOCX_Exontrol1:Layers:[Item,4]:RotateAngle
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,4]:RotateAngle := oDCOCX_Exontrol1:FormatABC("A - B",oDCOCX_Exontrol1:Layers:[Item,4]:RotateAngle,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 5
var_Layer := oDCOCX_Exontrol1:Layers:[Item,4]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:DefaultRotateAngle := -142
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,2]
	var_Layer1:OnDrag := exDoRotate
	var_Layer1:RotateType := exRotateBilinearInterpolation

33
How can I clip one layer while other is rotating

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,9]:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaptionTop] := 18
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaptionTop] := 36
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaptionTop] := 54
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:OffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:OffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaptionTop] := 72
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionLeft] := oDCOCX_Exontrol1:FormatABC("value - 12",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientX,:RotamoveCenterX,:RotamoveCenterY],nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionTop] := oDCOCX_Exontrol1:FormatABC("value - 36",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientY,:RotamoveCenterX,:RotamoveCenterY],nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,3]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle
	oDCOCX_Exontrol1:Layers:[Item,4]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,3]:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("100 - value - B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_Layer as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:DefaultRotateAngle := -126
	var_Layer:OnDrag := exDoRotamove
	var_Layer:RotateAngleToValue := "100 - value / 360 * 100"
	var_Layer:ValueToRotateAngle := "(value)/100 * 360"
oDCOCX_Exontrol1:Layers:[Item,3]:Clip:Pie:SweepAngle := "value"
oDCOCX_Exontrol1:Layers:[Item,4]:Clip:Pie:SweepAngle := oDCOCX_Exontrol1:Layers:[Item,3]:Clip:Pie:SweepAngle
oDCOCX_Exontrol1:Layers:[Item,9]:Value := 25
oDCOCX_Exontrol1:EndUpdate()

32
Can I move one or more layers at once

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,3]:[Brightness,exRedChannel] := oDCOCX_Exontrol1:FormatABC("100 - value ",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,4]:[Brightness,exRedChannel] := oDCOCX_Exontrol1:Layers:[Item,3]:[Brightness,exRedChannel]
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (100 - value format ``)",oDCOCX_Exontrol1:Layers:[Item,9]:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaptionTop] := 18
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaptionTop] := 36
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaptionTop] := 54
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:OffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:OffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaptionTop] := 72
	oDCOCX_Exontrol1:Layers:[Item,10]:RotateAngle := oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle
RETURN NIL

METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
	// DblClick event - Occurs when the user dblclk the left mouse button over an object.
	oDCOCX_Exontrol1:Value := 0
RETURN NIL

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise )
	// ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `°` ", DragInfo.CumulativeRotateAngle )
	OutputDebugString(String2Psz( AsString(DragInfo) ))
	oDCOCX_Exontrol1:[ExtraCaption,"Clockwise",exLayerCaptionTop] := 90
	oDCOCX_Exontrol1:[ExtraCaption,"Cumulative",exLayerCaptionTop] := 108
RETURN NIL

METHOD OCX_Exontrol1DragEnd(DragInfo,Cancel) CLASS MainDialog
	// DragEnd event - Occurs once the user ends dragging a layer.
	oDCOCX_Exontrol1:[ExtraCaption,"Clockwise",exLayerCaption] := ""
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug  = 227
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
	oDCOCX_Exontrol1:[ExtraCaption,"Clockwise",exLayerCaption] := ""
	oDCOCX_Exontrol1:[ExtraCaption,"Cumulative",exLayerCaption] := ""
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("100 - A - B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2,var_Layer3 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerRotateType] := 2
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:DefaultRotateAngle := -126
	var_Layer:RotateAngleToValue := "100 - (value ) / 360 * 100"
	var_Layer:ValueToRotateAngle := "(value)/100 * 360"
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,10]
	var_Layer1:Grayscale := 100
	var_Layer1:Transparency := 25
	var_Layer1:DefaultRotateAngle := -69.5
	var_Layer1:RotateAngleToValue := "100 - (value ) / 360 * 100"
	var_Layer1:ValueToRotateAngle := "(value 1)/100 * 360"
	var_Layer1:Background:Picture:Value := "Highlighted_Layer4.png"
var_Layer2 := oDCOCX_Exontrol1:Layers:[Item,3]
	var_Layer2:[Brightness,exAllChannels] := 0
	var_Layer2:[Brightness,exRedChannel] := 0
var_Layer3 := oDCOCX_Exontrol1:Layers:[Item,4]
	var_Layer3:[Brightness,exAllChannels] := 0
	var_Layer3:[Brightness,exRedChannel] := 0
oDCOCX_Exontrol1:LayerOfValue := 9
oDCOCX_Exontrol1:Value := 5
oDCOCX_Exontrol1:EndUpdate()

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,3]:Transparency := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,4]:Transparency := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (100 - value format ``)",oDCOCX_Exontrol1:Layers:[Item,9]:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaptionTop] := 18
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaptionTop] := 36
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaptionTop] := 54
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:OffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:OffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaptionTop] := 72
RETURN NIL

METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
	// DblClick event - Occurs when the user dblclk the left mouse button over an object.
	oDCOCX_Exontrol1:Value := 0
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("100 - A - B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 11
oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
var_Layer := oDCOCX_Exontrol1:Layers:[Item,9]
	var_Layer:OnDrag := exDoRotamove
	var_Layer:DefaultRotateAngle := -126
	var_Layer:RotateAngleToValue := "100 - value / 360 * 100"
	var_Layer:ValueToRotateAngle := "(value)/100 * 360"
	var_Layer:Background:[ExtraPicture,"Aka"]:Value := "Highlighted_Layer4.png"
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,3]
	var_Layer1:[Brightness,exAllChannels] := 0
	var_Layer1:[Brightness,exRedChannel] := 100
var_Layer2 := oDCOCX_Exontrol1:Layers:[Item,4]
	var_Layer2:OnDrag := exDoRotamove
	var_Layer2:[Brightness,exAllChannels] := 0
	var_Layer2:[Brightness,exRedChannel] := 100
oDCOCX_Exontrol1:Value := 15
oDCOCX_Exontrol1:EndUpdate()

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Value: <b>` + (100 - value format ``)",oDCOCX_Exontrol1:Layers:[Item,9]:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotateAngle: <b>` + ( A format `` ) + `°`",oDCOCX_Exontrol1:Layers:[Item,9]:RotateAngle,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotateAngle",exLayerCaptionTop] := 18
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveCenter",exLayerCaptionTop] := 36
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveOffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"RotamoveOffset",exLayerCaptionTop] := 54
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("` Offset: <b> (` + A + `,` + B + `)`",oDCOCX_Exontrol1:Layers:[Item,9]:OffsetX,oDCOCX_Exontrol1:Layers:[Item,9]:OffsetY,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Offset",exLayerCaptionTop] := 72
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",oDCOCX_Exontrol1:Value,nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionLeft] := oDCOCX_Exontrol1:FormatABC("value - 8",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY],nil,nil)
	oDCOCX_Exontrol1:[ExtraCaption,"Client",exLayerCaptionTop] := oDCOCX_Exontrol1:FormatABC("value - 26",oDCOCX_Exontrol1:Layers:[Item,9]:[LayerToClientY,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterX,oDCOCX_Exontrol1:Layers:[Item,9]:RotamoveCenterY],nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,7]:RotateAngle := oDCOCX_Exontrol1:Layers:[Item,0]:RotateAngle
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("100 - A - B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2 as ILayer

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

29
How can I display an indicator

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,1]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",:Layers:[Item,1]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipRectangle as IClipRectangle
local var_Layer,var_Layer1 as ILayer

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

28
How can I display a gauge

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,1]:[Brightness,exGreenChannel] := oDCOCX_Exontrol1:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

local var_Layer,var_Layer1 as ILayer

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColor := RGB(217,217,217)
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
oDCOCX_Exontrol1:Layers:Count := 2
oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:RotateCenterY := "lheight/2 + 78"
	var_Layer:Background:Picture:Name := "Guage_Background.png"
var_Layer1 := oDCOCX_Exontrol1:Layers:[Item,1]
	var_Layer1:OnDrag := exDoRotate
	var_Layer1:Background:Picture:Name := "Guage_Needle.png"
	var_Layer1:RotateAngleValid := "value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))"
	var_Layer1:RotateAngleToValue := "value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50"
	var_Layer1:ValueToRotateAngle := "value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90"
	var_Layer1:RotateType := exRotateBilinearInterpolation
	var_Layer1:[Brightness,exAllChannels] := 0
oDCOCX_Exontrol1:Value := 78
oDCOCX_Exontrol1:EndUpdate()

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"sec"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"min"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"hour"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"range"]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,"pointer"]:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = -1

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,"pointer"]:Value := oDCOCX_Exontrol1:FormatABC("A - B",oDCOCX_Exontrol1:Layers:[Item,"pointer"]:Value,Delta,nil)
RETURN NIL

METHOD OCX_Exontrol1Timer(TickCount) CLASS MainDialog
	// Timer event - Occurs when the interval elapses.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC(" date(`now`)",nil,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,"pointer"]:Value := oDCOCX_Exontrol1:FormatABC("sin((value/100 mod 100)/100 * 2 * asin(1)) * 100",TickCount,nil,nil)
	oDCOCX_Exontrol1:Layers:[Item,"range"]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,"pointer"]:Value
RETURN NIL

local var_ClipPie as IClipPie
local var_Picture,var_Picture1,var_Picture2 as ILPicture
local var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5,var_Layer6,var_Layer7,var_Layer8 as ILayer

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

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"sec"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"min"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"hour"]:Value := oDCOCX_Exontrol1:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - 1/24/60/60*B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

METHOD OCX_Exontrol1Timer(TickCount) CLASS MainDialog
	// Timer event - Occurs when the interval elapses.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value + 1/24/60/60",oDCOCX_Exontrol1:Value,nil,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4 as ILayer

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

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

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"sec"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"min"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"hour"]:Value := oDCOCX_Exontrol1:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - 1/24/60/60*B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

METHOD OCX_Exontrol1Timer(TickCount) CLASS MainDialog
	// Timer event - Occurs when the interval elapses.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value + 1/24/60/60",:Value,nil,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layer5 as ILayer

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

24
How can I display a clock (rotate)

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"sec"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"min"]:Value := oDCOCX_Exontrol1:Value
	oDCOCX_Exontrol1:Layers:[Item,"hour"]:Value := oDCOCX_Exontrol1:Value
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.

RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("A - 1/24/60/60*B",oDCOCX_Exontrol1:Value,Delta,nil)
RETURN NIL

METHOD OCX_Exontrol1Timer(TickCount) CLASS MainDialog
	// Timer event - Occurs when the interval elapses.
	oDCOCX_Exontrol1:Value := oDCOCX_Exontrol1:FormatABC("value + 1/24/60/60",oDCOCX_Exontrol1:Value,nil,nil)
RETURN NIL

local var_Layer,var_Layer1,var_Layer2,var_Layer3 as ILayer

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

23
How can I clip as a triangle

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipPolygon as IClipPolygon
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Clip := var_Layer:Clip
		var_ClipPolygon := var_Clip:Polygon
			var_ClipPolygon:Points := 3
			var_ClipPolygon:[X,0] := AsString(0)
			var_ClipPolygon:[Y,0] := "height"
			var_ClipPolygon:[X,1] := "width/2"
			var_ClipPolygon:[Y,1] := "value/100*width"
			var_ClipPolygon:[X,2] := "width"
			var_ClipPolygon:[Y,2] := "height"
			var_ClipPolygon:InverseClip := true
		var_Clip:Value := 50

22
How can I limit the rotation from 0 to 360 degree, while dragging
METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483
	// DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

21
How can I clip as a pie

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = -1
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipPie as IClipPie
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Left := "(width-128)/2"
	var_Layer:Top := "(height-128)/2"
	var_Layer:Height := AsString(128)
	var_Layer:Width := AsString(128)
	var_Layer:Background:Color:Value := RGB(0,255,0)
	var_Clip := var_Layer:Clip
		var_ClipPie := var_Clip:Pie
			var_ClipPie:InverseClip := true
			var_ClipPie:StartAngle := AsString(0)
			var_ClipPie:SweepAngle := "value/100*360"
		var_Clip:Value := 15

20
How can I use a picture to clip the layer

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:Layers:[Item,"Clip"]:Clip:Value := oDCOCX_Exontrol1:Layers:[Item,"Thumb"]:RotateAngle
RETURN NIL

local var_Clip as IClip
local var_ClipPicture as IClipPicture
local var_Layer,var_Layer1 as ILayer

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

19
How do I clip a circle/ellipse

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Left := "(width-128)/2"
	var_Layer:Top := "(height-128)/2"
	var_Layer:Height := AsString(128)
	var_Layer:Width := AsString(128)
	var_Layer:Background:Color:Value := RGB(0,255,0)
	var_Clip := var_Layer:Clip
		var_Clip:Ellipse:RadiusX := "value/100 * width"
		var_Clip:Value := 25

18
What InverseClip does

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipRoundRectangle as IClipRoundRectangle
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Left := "(width-128)/2"
	var_Layer:Top := "(height-128)/2"
	var_Layer:Height := AsString(128)
	var_Layer:Width := AsString(128)
	var_Layer:Background:Color:Value := RGB(0,255,0)
	var_Clip := var_Layer:Clip
		var_ClipRoundRectangle := var_Clip:RoundRectangle
			var_ClipRoundRectangle:Width := "value/100 * width"
			var_ClipRoundRectangle:RoundRadiusX := "width/8"
			var_ClipRoundRectangle:RoundRadiusY := "height/8"
			var_ClipRoundRectangle:InverseClip := true
		var_Clip:Value := 50

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipRoundRectangle as IClipRoundRectangle
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Left := "(width-128)/2"
	var_Layer:Top := "(height-128)/2"
	var_Layer:Height := AsString(128)
	var_Layer:Width := AsString(128)
	var_Layer:Background:Color:Value := RGB(0,255,0)
	var_Clip := var_Layer:Clip
		var_ClipRoundRectangle := var_Clip:RoundRectangle
			var_ClipRoundRectangle:Width := "value/100 * width"
			var_ClipRoundRectangle:RoundRadiusX := "width/8"
			var_ClipRoundRectangle:RoundRadiusY := "height/8"
		var_Clip:Value := 50

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipRectangle as IClipRectangle
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Clip := var_Layer:Clip
		var_ClipRectangle := var_Clip:Rectangle
			var_ClipRectangle:Height := "value/100 * height"
			var_ClipRectangle:InverseClip := true
		var_Clip:Value := 50

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Clip := var_Layer:Clip
		var_Clip:Rectangle:Height := "value/100 * height"
		var_Clip:Value := 50

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_ClipRectangle as IClipRectangle
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Clip := var_Layer:Clip
		var_ClipRectangle := var_Clip:Rectangle
			var_ClipRectangle:Width := "value/100 * width"
			var_ClipRectangle:InverseClip := true
		var_Clip:Value := 50

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

METHOD OCX_Exontrol1Drag(DragInfo) CLASS MainDialog
	// Drag event - Notifies that the user drags the layer.
	// Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )

RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug= 287
	local var_Layer as ILayer
	var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
		var_Layer:UserData := var_Layer:Clip:Value
RETURN NIL

METHOD OCX_Exontrol1MouseWheel(Delta) CLASS MainDialog
	// MouseWheel event - Occurs when the mouse wheel moves while the control has focus
	oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value := oDCOCX_Exontrol1:FormatABC("(value + B) MIN 0 MAX 100",oDCOCX_Exontrol1:Layers:[Item,0]:Clip:Value,Delta,nil)
RETURN NIL

local var_Clip as IClip
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Clip := var_Layer:Clip
		var_Clip:Rectangle:Width := "value/100 * width"
		var_Clip:Value := 50

12
How can I associate a value to rotation angle

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`Value: <b>` + (value format ``) ",oDCOCX_Exontrol1:Layers:[Item,0]:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

11
How can I associate a value to vertical offset

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,0]:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 287

RETURN NIL

local var_Layer as ILayer

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

10
How can I associate a value to horizontal offset

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`Value: <b>` + (value format ``)",oDCOCX_Exontrol1:Layers:[Item,0]:Value,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 287

RETURN NIL

local var_Layer as ILayer

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

9
How can I display the current angle

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`Angle: <b>` + (value format ``) + `°`",oDCOCX_Exontrol1:Layers:[Item,0]:RotateAngle,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

8
How can I limit the rotation angle

METHOD OCX_Exontrol1Change(Layer) CLASS MainDialog
	// Change event - Occurs when the layer's value is changed.
	oDCOCX_Exontrol1:[Caption,exLayerCaption] := oDCOCX_Exontrol1:FormatABC("`Angle: <b>` + (value format ``) + `°`",oDCOCX_Exontrol1:Layers:[Item,0]:RotateAngle,nil,nil)
RETURN NIL

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

7
Can I specify a different center while rotating

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

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

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

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

5
How can I rotate a layer

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 483

RETURN NIL

local var_Picture as ILPicture
local var_Layer as ILayer

var_Layer := oDCOCX_Exontrol1:Layers:Add("back")
	var_Picture := var_Layer:Background:Picture
		var_Picture:Value := "c:\exontrol\images\card.png"
		var_Picture:Width := "pwidth"
		var_Picture:Height := "pheight"
	var_Layer:OnDrag := exDoRotate
	var_Layer:RotateAngle := 45

4
Is there any way to debug the layer while moving

METHOD OCX_Exontrol1DragStart(DragInfo,Cancel) CLASS MainDialog
	// DragStart event - Occurs once the user starts dragging a layer.
	// DragInfo.Debug = 287

RETURN NIL

local var_Layer as ILayer

var_Layer := oDCOCX_Exontrol1:Layers:Add("back")
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Layer:OnDrag := exDoMove

3
How do I specify where to move the layer, while dragging
local var_Layer as ILayer

var_Layer := oDCOCX_Exontrol1:Layers:Add("back")
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Layer:OnDrag := exDoMove
	var_Layer:OffsetXValid := "int(value / 64) * 64"
	var_Layer:OffsetYValid := "int(value / 64) * 64"

2
How can I add layers to the control
local var_Layer as ILayer

var_Layer := oDCOCX_Exontrol1:Layers:Add("back")
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Layer:OnDrag := exDoMove

1
How can I add layers to the control
local var_Layer as ILayer

oDCOCX_Exontrol1:Layers:Count := 1
var_Layer := oDCOCX_Exontrol1:Layers:[Item,0]
	var_Layer:Background:Picture:Value := "c:\exontrol\images\card.png"
	var_Layer:OnDrag := exDoMove