58:
Tic Tac Toe Game

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Click()
	' Left = Me.Layers(l).Left
	' Top = Me.Layers(l).Top
	' Width = Me.Layers(l).Width
	' Height = Me.Layers(l).Height
	With Gauge1
		l = .LayerFromPoint(-1,-1)
		With .Layers
			With .Add(Gauge1.Layers.Count)
				With .Background.Picture
					.Left = "8"
					.Width = "width - 2 * 8"
					.Top = "8"
					.Height = "height - 2 * 8"
					.Name = Gauge1.FormatABC("A mod 2 = 0 ? `x` : `o`",Gauge1.Layers.Count)
				End With
				.Transparency = 0
			End With
		End With
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABS0IQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAZAEiWIovRbHMBzFIMYRFFCcIRGSaYD" & _
	"iCNovTRNE7TfBMIhkGoSaKpCIRVDCSYJUzTc6wS79KgAASiJjjao6ZhaSpSABRYiyXRlHSxLiuYyoGTrJACEQxDhEEIjGLAazLMadJItCzabqGbJ8Ro6cQwTAIgI="
		.DefaultLayer(18) = "width/3"
		.DefaultLayer(19) = "height/3"
		.HTMLPicture("x") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\x.png"
		.HTMLPicture("o") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\o.png"
		.LayerAutoSize = -1
		.Layers.Count = 9
		With .Layers.Item(0)
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(1)
			.Left = " width/3 - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(2)
			.Left = "2 * (width/3 - 4) - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(3)
			.Top = "height/3 - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(4)
			.Top = "height/3 - 4"
			.Left = " width/3 - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(5)
			.Top = "height/3 - 4"
			.Left = "2 * (width/3 - 4) - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(6)
			.Top = "2 * (height/3 - 4) "
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(7)
			.Top = "2 * (height/3 - 4) "
			.Left = " width/3 - 4"
			.Background.Color.Value = &H1000000
		End With
		With .Layers.Item(8)
			.Top = "2 * (height/3 - 4) "
			.Left = "2 * (width/3 - 4) - 4"
			.Background.Color.Value = &H1000000
		End With
		.DefaultLayer(22) = 99
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

57:
What's the difference Rotate vs Rotamove

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 227
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.AllowSmoothChange = 0
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Button with LEDs"
		With .Layers
			With .Add("base")
			End With
			With .Add("rotate")
				.ToolTip = .Key
				With .Background.Picture
					.Name = "Example Button Up.png"
					.Left = "width/2"
					.Top = "height/2"
					.Width = 128
					.Height = 64
				End With
				With .Foreground
					.Caption(0) = "<font ;14><sha ;;0>Rotate"
					.Caption(4) = "width/2 + 32"
					.Caption(5) = "height/2 + 16"
				End With
				.Brightness(1) = 100
				.OnDrag = 2
				.RotateAngle = 45
			End With
			With .Add("rotamove")
				.ToolTip = .Key
				With .Background.Picture
					.Name = "Example Button Up.png"
					.Left = "width/2"
					.Top = "height/2"
					.Width = 128
					.Height = 64
				End With
				With .Foreground
					.Caption(0) = "<font ;14><sha ;;0>Rotamove"
					.Caption(4) = "width/2 + 24"
					.Caption(5) = "height/2 + 16"
				End With
				.Brightness(2) = 100
				.RotateAngle = 45
				.Transparency = 25
				.OnDrag = 3
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseIn(Layer)
	With Gauge1
		.Layers.Item(9).ToolTip = Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Gauge1.Value)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 10
		With .Layers.Item(9)
			.DefaultRotateAngle = -126
			.OnDrag = 3
			.RotateAngleToValue = "100 - value / 360 * 100"
			.ValueToRotateAngle = "(value)/100 * 360"
		End With
		.Layers.Item(3).Visible = False
		.Layers.Item(4).Visible = False
		.Layers.Item(9).Value = 25
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Layers(DragInfo.Layer).Clip.Ellipse
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.BackColor = RGB(217,217,217)
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
		With .Layers.Add("background")
			.Background.Picture.Name = "Guage_Background.png"
			With .Clip.Ellipse
				.RadiusX = "width/3"
				.RadiusY = "height/3"
			End With
		End With
		.Layers.Add("needle").Background.Picture.Name = "Guage_Needle.png"
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("Color").Clip.Value = Gauge1.Layers.Item("Thumb").RotateAngle
		With .Layers.Item("Color")
			.Brightness(3) = .RotateAngle
		End With
		.Layers.Item("Thumb").Brightness(3) = Gauge1.Layers.Item("Color").RotateAngle
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 5
		.Layers.Item(1).Visible = False
		With .Layers.Item(4)
			.Key = "Thumb"
			.DefaultRotateAngle = -141
			.OnDrag = 2
			.RotateType = 2
			.Brightness(0) = 0
			.Brightness(1) = 100
		End With
		With .Layers.Add("Color")
			.OnDrag = 2
			.Position = 3
			.Brightness(0) = 0
			.Brightness(1) = 100
			.Background.Picture.Name = "Layer3.png"
			.Clip.Pie.SweepAngle = "value"
			With .Clip.Ellipse
				.RadiusX = "150"
				.RadiusY = "150"
				.InverseClip = True
			End With
		End With
		.Layers.Item("Thumb").RotateAngle = 135
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("Color").Clip.Value = Gauge1.Layers.Item("Thumb").RotateAngle
		With .Layers.Item("Color")
			.Brightness(3) = .RotateAngle
		End With
		.Layers.Item("Thumb").Brightness(3) = Gauge1.Layers.Item("Color").RotateAngle
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 5
		.Layers.Item(1).Visible = False
		With .Layers.Item(4)
			.Key = "Thumb"
			.DefaultRotateAngle = -141
			.OnDrag = 2
			.RotateType = 2
			.Brightness(0) = 0
			.Brightness(2) = 100
		End With
		With .Layers.Add("Color")
			.OnDrag = 2
			.Position = 3
			.Brightness(0) = 0
			.Brightness(2) = 100
			.Background.Picture.Name = "Layer3.png"
			.Clip.Pie.SweepAngle = "value"
		End With
		.Layers.Item("Thumb").RotateAngle = 135
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		With .Layers.Add("default")
			.OnDrag = 1
			.Background.Picture.Name = "Layer2.png"
			.DefaultOffsetY = -164
		End With
		With .Layers.Add("notransparency")
			.OnDrag = 1
			.Background.Picture.Name = "Layer2.png"
			With .Clip.Picture
				.Name = Gauge1.Layers.Item("notransparency").Background.Picture.Name
				.AlphaTo = "128"
			End With
			.Grayscale = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

51:
How can I resize all layers

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 5
		With .Layers.Add("autosize")
			.Visible = False
			.Width = 164
			.Height = 128
		End With
		.LayerAutoSize = .Layers.Item("autosize").Index
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

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

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

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

49:
How can I prevent dragging the layers when user right click it
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' Cancel = Me.FormatABC("A=2",DragInfo.Button)
End Function
</SCRIPT>

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

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

48:
Is your control DPI-Aware

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.DefaultLayer(185) = 2
		.Layers.Count = 11
		.Layers.Item(3).Grayscale = True
		.Layers.Item(4).Grayscale = True
		With .Layers.Item(10)
			.Width = "128 * dpix"
			.Height = "128 * dpiy"
		End With
		.Layers.Item(9).OnDrag = 2
		.LayerAutoSize = 10
	End With
End Function
</SCRIPT>
</BODY>

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 10
		With .Layers.Item(9)
			.RotateType = 2
			.OnDrag = 2
		End With
		.AllowMoveOnClick = True
		.LayerUpdate = 2
	End With
End Function
</SCRIPT>
</BODY>

46:
How can I show the layers on perspective

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

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

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.DefaultLayer(185) = 2
		.Layers.Count = 11
		.Layers.Item(3).Grayscale = True
		.Layers.Item(4).Grayscale = True
		.Layers.Item(9).OnDrag = 2
		With .Layers.Item(10)
			.Width = 128
			.Height = 128
		End With
		.LayerAutoSize = 10
	End With
End Function
</SCRIPT>
</BODY>

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.DefaultLayer(185) = 2
		.Layers.Count = 10
		.Layers.Item(3).Grayscale = True
		.Layers.Item(4).Grayscale = True
		.LayerAutoSize = -1
	End With
End Function
</SCRIPT>
</BODY>

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 12
		.Layers.Item(0).Background.Picture.Name = "\..\Clock\vista_clock.png"
		.Layers.Item(9).Background.Picture.Name = "\..\Knob 2\Layer3.png"
		.Layers.Item(10).Background.Picture.Name = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noBack.png"
		With .Layers.Item(11)
			.DefaultOffsetX = 64
			.DefaultOffsetY = -36
			With .Background.Picture
				.Name = "gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQEX5JIhBKhYQrFSxNNhUKoUY7/c6+R6+a7pPg0UAjaISTQwCzMEgtWQ2IyDBJJMYiNJCJgTVJuMghNTcSgFA" & _
	"xlNZiMinYKNRQ2NxMBhWNQkSRUAQkRRNEhYEBhMogMADOwGfY6N7eXb3DgXeamZgMGbQIStE55RZ7c7ce7/XpzZycOaBf7ZNAlZwiGQIMAnQBnAL4ACKAACABXADMAY4" & _
	"BLgHYiXS6VQAESyDbAHYAGwvea9E4BXhPIgXD4KQCZD4FeAJzqWFLcNQf1KkSgyFYGMDmVoAEwAHjxQDiOo7AbgKqlaj8WQBRgxDYBfmabpDRTXdumF5ZSwVboXIBrTo" & _
	"AhgBIwHWFREvoNZtlsb42G6Kg2g4b59AeYgAnAMpWnqBZWk2JoIkQcY8AGQAvgAPBWkcScUnceh6FoLYWAsepsGwLBsCcMIMh8C4AHYOAODOVIUHaYwviKMgvh2eIxmO" & _
	"RxcnHJ5MjYExBlmM5nBAVgqGodY9nuFxXGoA5al8WIJmAe5OgAIxtD6bJUimU5uC4GxFiOaxXkOc59lwOh0kkFYREWFZ6iSdhiiMQBSg0VArFWAZ0CgepijEKJdlcBZn" & _
	"nuaJ2n2PBZCgaAHnESZsHmRpFlKBBECQY5hA2DoOgaYYYCoC4zjObpAkCAJ+mVGgQBEFZ7CSVgbgYYYGk8c4ugODRFFgKRUnYAZ4C8E5ECqWwOl8d5/gcGgjmALQRjiU" & _
	"BQmg9oVDWBAIFoAZ8DmBoAlcWoBlwWAjHEK5pnSehpDALR9A2U1+FWAB3B2X4rmCJwaBcLQNmiG4AG8do6FkLRWjEOw7GsEwRBQUogCIEBRH0LJEAQeR8h4c55jyXwDm" & _
	"AK9TlMLIoBcS4pgAZwBGwaB3FIGIDBHopsmWS4Xh2HpUgoPhvkOcYcWANBWiCIh5GicJhnKUOvCcJp0CIGxNg6doEIUUopHSGoAA+OhhFeKgVBoGIYnCfo7HcTgdhuG4" & _
	"zkWBB68GdJmkKQQPcSVx6Hue47l0foMAAZ5yjkXJTBoW5ekgSglFKZ4AAYO5BDwIAdkgZZykcWg3G8OoPlgNpDicT4fH6AwZk+M4zDEMwZGMVB9GGZgqGeO51kmfAbny" & _
	"GQZjSVofmeepzB8Nojmqah+gQEAzCsKfvgoI5oniYOvCCZaghiWfeiWNY2mOOJ2CMKJyDUVpOhwR38EcDpWlq/4Ox6xLAxCMIkRAShQCoC4C4D42RaCpH+BAGY1wDiDF" & _
	"oGgbwFQIjbHuH0Y48x+BUCeE8O47h0DRBeN8FwFAFC7ESMgJ4AAOARFyCsOQSgIhbEsK0FoywZC2DaOsFAig3DOGYMwPguAzjPE8G8QZFT1ghEA5IG4QhaHIB4M8Jrag" & _
	"UitDqK5jIrhvj2HoLYU49hHjvA+NsWQZRligHWLoDwRAkAaGcBICIExIshBwAgQQ8ojjMCeAcB4Hh8DiGMI0X4rhiixEyNcLQBwRASAEIgKAKxjB7CMEAfIfhbjrB0E4" & _
	"JQGxOgWEiF4CIzhFjgDi+gfQdh2jaBqLQPo+x7CNHSEwYwfwWCfHeA5WYXgsBYAQG4bougag/B6P0eYHwpg/A4D8F4pBXArGQJwRI9RviGHyDYQARQAAVAAPoTwAACCQ" & _
	"GoCADgrxljzF0KwVwbgDBnGIJIDgGxnCxHgDoGInAxhmC+O4agjwUCQBMEIVAiA3ALCiMkRAKgAhcGsHEKgTg3BFikGoEQ3hqCkE0DsMILQbgCGADgVwGwsiOCKCYGQB" & _
	"BAgREiKoRABIkATGYK4AAThJAGBCEACYEAEhRGKBAFoCAmBgEYAkSQCQthtEuPsWwAAkgUCIAARzUgnD3HoHAS46xMDFWgDUbQLAlDMgiKsFwIw2AzGwEoUQJXQjXCIG" & _
	"IAwQhUh9DiJQBAxwQAwFID0IA2wjCkCQBEBYUw3g2AWMsKwNAvgqFWLQJIOwbAcBOEIMgLwxDRGkNACw7gAAwDUPkRokwYBrCKKQLo1xKhIDWGEMYOhnCGD+AETIaBOC" & _
	"ABEEYVY0yI1SCKE4IgrghBgEEQEA="
				.Width = 64
				.Height = 64
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseMove(Button,Shift,X,Y)
	With Gauge1
		alert( .LayerFromPoint(-1,-1) )
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 12
		With .Layers.Item(10)
			.RotateType = 2
			.OnDrag = 2
			With .Background.ExtraPicture("extra1")
				.Name = "Layer1.png"
				.Left = "32"
				.Top = "32"
				.Width = 64
				.Height = 64
			End With
			With .Foreground
				.Caption(0) = "<sha ;;0>selectable"
				.Caption(4) = 38
				.Caption(5) = -5
			End With
		End With
		With .Layers.Item(11)
			With .Background.ExtraPicture("extra2")
				.Name = "Layer1.png"
				.Left = "width-64"
				.Top = "height-84 - 32"
				.Width = 64
				.Height = 64
				.Selectable = False
			End With
			.Brightness(0) = 25
			With .Foreground
				.Caption(0) = "<sha ;;0>not selectable"
				.Caption(3) = 8
				.Caption(5) = "height-theight/4"
			End With
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

41:
How do I get the layer/object/picture from the cursor
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseMove(Button,Shift,X,Y)
	With Gauge1
		alert( .LayerFromPoint(-1,-1) )
	End With
End Function
</SCRIPT>

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

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

40:
How can I display a speedometer

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		Gauge1.Layers.Item("arc").Clip.Value = Gauge1.Value
		Gauge1.Layers.Item("noDigit").Background.ExtraPicture("80").Name = Gauge1.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",Gauge1.Value)
		Gauge1.Layers.Item("noDigit").Background.ExtraPicture("08").Name = Gauge1.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",Gauge1.Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("value + B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.BackColor = RGB(40,40,40)
		.AllowSmoothChange = 0
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
		.Layers.Count = 6
		With .Layers.Item(0)
			.Key = "arcBack"
			.Background.Picture.Name = "noArcBack.png"
			With .Clip.Pie
				.StartAngle = 240
				.SweepAngle = 240
			End With
		End With
		With .Layers.Item(1)
			.Key = "arc"
			.Background.Picture.Name = "noArc.png"
			With .Clip.Pie
				.StartAngle = 240
				.SweepAngle = "value/100 * 240"
			End With
		End With
		With .Layers.Item(2)
			.RotateType = 2
			.Key = "pointer"
			.Background.Picture.Name = "noLine.png"
			.DefaultRotateAngle = 240
			.RotateAngleToValue = "value/240 * 100"
			.ValueToRotateAngle = "value / 100 * 240"
			.RotateAngleValid = "value > 240 ? (value > 300 ? 0 : 240) : value"
			.OnDrag = 2
		End With
		With .Layers.Item(3)
			.Key = "noBack"
			.Left = "(width - 55 * 2)/2"
			.Top = "(height - 94 * 1)/2"
			.Width = "2 * 45 + 8"
			.Height = "1 * 94"
			.Transparency = 90
			With .Background.ExtraPicture("80")
				.Name = "noBack.png"
				.Left = "-4"
				.Width = "70"
			End With
			With .Background.ExtraPicture("08")
				.Name = "noBack.png"
				.Left = "36"
				.Width = 70
			End With
		End With
		With .Layers.Item(4)
			.Key = "noDigit"
			.Left = "(width - 55 * 2)/2"
			.Top = "(height - 94 * 1)/2"
			.Width = "2 * 45 + 8"
			.Height = "1 * 94"
			With .Background.ExtraPicture("80")
				.Name = "no1.png"
				.Left = "-4"
				.Width = "70"
			End With
			With .Background.ExtraPicture("08")
				.Name = "no2.png"
				.Left = "36"
				.Width = 70
			End With
		End With
		With .Layers.Item(5)
			.Key = "noCap"
			.Background.Picture.Name = "noCap.png"
			.Transparency = 45
		End With
		Gauge1.Layers.Item("pointer").Position = Gauge1.Layers.Item("noCap").Position
		.LayerOfValue = Gauge1.Layers.Item("pointer").Index
		.Value = 56
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

39:
How can I display LED-numbers

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Value = Gauge1.FormatABC("value MIN 0 MAX 99",.Value)
		Gauge1.Layers.Item("noDigit").Background.ExtraPicture("80").Name = Gauge1.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`",Gauge1.Value)
		Gauge1.Layers.Item("noDigit").Background.ExtraPicture("08").Name = Gauge1.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`",Gauge1.Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("value + B",Gauge1.Layers.Item("noDigit").Value,Delta)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Timer(TickCount)
	With Gauge1
		.Value = Gauge1.FormatABC("value = 99 ? 0 : ( value  + B )",Gauge1.Value,1)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.AllowSmoothChange = 0
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed"
		.Layers.Count = 3
		With .Layers.Item(1)
			.Key = "noBack"
			.Left = "(width - 55 * 2)/2"
			.Top = "(height - 94 * 1)/2"
			.Width = "2 * 45 + 8"
			.Height = "1 * 94"
			.Transparency = 90
			With .Background.ExtraPicture("80")
				.Name = "noBack.png"
				.Left = "-4"
				.Width = "70"
			End With
			With .Background.ExtraPicture("08")
				.Name = "noBack.png"
				.Left = "36"
				.Width = 70
			End With
		End With
		With .Layers.Item(2)
			.Key = "noDigit"
			.Left = "(width - 55 * 2)/2"
			.Top = "(height - 94 * 1)/2"
			.Width = "2 * 45 + 8"
			.Height = "1 * 94"
			With .Background.ExtraPicture("80")
				.Name = "no1.png"
				.Left = "-4"
				.Width = "70"
			End With
			With .Background.ExtraPicture("08")
				.Name = "no2.png"
				.Left = "36"
				.Width = 70
			End With
		End With
		.LayerOfValue = Gauge1.Layers.Item("noDigit").Index
		.Value = 73
		.TimerInterval = 100
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.LayerAutoSize = -1
		.DefaultLayer(18) = "width MAX height"
		.DefaultLayer(19) = "width MAX height"
		.Layers.Count = 5
		With .Layers.Item(4)
			.OnDrag = 3
			.DefaultRotateAngle = -142
		End With
	End With
End Function
</SCRIPT>
</BODY>

37:
How can I display a switch

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Click()
	With Gauge1
		.Value = Gauge1.FormatABC("(value + 1) mod 2",.Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragEnd(DragInfo,Cancel)
	With Gauge1
		.Value = Gauge1.FormatABC("(value < 24 ? 0 : 1)",Gauge1.Layers.Item("knob").OffsetX)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("value > 0 ? 1 : 0",Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch"
		.Layers.Count = 4
		.Layers.Item(0).Background.Picture.Name = "background.png"
		With .Layers.Item(1)
			With .Background.Picture
				.Name = "Indicator_ON.png"
				.DisplayAs = 16
			End With
			.OffsetXValid = 48
			.OffsetYValid = 0
		End With
		With .Layers.Item(2)
			With .Background.Picture
				.Name = "Indicator_OFF.png"
				.DisplayAs = 18
			End With
			.OffsetXValid = -12
			.OffsetYValid = 0
		End With
		With .Layers.Item(3)
			.OnDrag = 1
			.Key = "knob"
			With .Background.Picture
				.Name = "knob.png"
				.DisplayAs = 17
			End With
			.DefaultOffsetY = "9"
			.DefaultOffsetX = "-5"
			.OffsetYValid = "0"
			.ValueToOffsetX = "value = 0 ? 0 : 48"
			.OffsetToValue = "value = 0 ? 0 : 1"
			.OffsetXValid = "(value MIN 0 MAX 48)"
		End With
		.LayerOfValue = Gauge1.Layers.Item("knob").Index
		.Value = 1
	End With
End Function
</SCRIPT>
</BODY>

36:
How can I colorize the layer

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("` Value: <b>` + (value format ``)",.Layers.Item(4).Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Click()
	With Gauge1
		With .Item(.Layers.LayerFromPoint(-1,-1))
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseIn(Layer)
	With Gauge1
		With .Layers.Item(Layer)
			.Brightness(1) = 100
			.Brightness(2) = 0
			.Brightness(3) = 0
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseOut(Layer)
	With Gauge1
		With .Layers.Item(Layer)
			.Brightness(1) = Gauge1.DefaultLayer(128)
			.Brightness(2) = Gauge1.DefaultLayer(128)
			.Brightness(3) = Gauge1.DefaultLayer(128)
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("A - B",.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.DefaultLayer(128) = 51
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 6
		With .Layers.Item(0)
			.RotateCenterX = "lwidth/2-3"
			.RotateCenterY = "lheight/2+23"
		End With
		With .Layers.Item(4)
			.DefaultRotateAngle = -132
			.OnDrag = 3
			.RotateAngleValid = "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
			.ValueToRotateAngle = "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
			.RotateAngleToValue = "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
		End With
		.Value = 45
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("` Value: <b>` + (value format ``)",.Layers.Item(4).Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("A - B",.Value,Delta)
	End With
End Function
</SCRIPT>

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

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

34:
How can I rotate more knobs at once

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("` Value: <b>` + (value format ``)",.Layers.Item(4).Value)
		.Layers.Item(2).RotateAngle = Gauge1.Layers.Item(4).RotateAngle
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		Gauge1.Layers.Item(4).RotateAngle = Gauge1.FormatABC("A - B",Gauge1.Layers.Item(4).RotateAngle,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 5
		With .Layers.Item(4)
			.OnDrag = 3
			.DefaultRotateAngle = -142
		End With
		With .Layers.Item(2)
			.OnDrag = 2
			.RotateType = 2
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("` Value: <b>` + (value format ``)",.Layers.Item(9).Value)
		.ExtraCaption("RotateAngle",0) = .FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",.Layers.Item(9).RotateAngle)
		.ExtraCaption("RotateAngle",5) = 18
		.ExtraCaption("RotamoveCenter",0) = .FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveCenterX,.Layers.Item(9).RotamoveCenterY)
		.ExtraCaption("RotamoveCenter",5) = 36
		.ExtraCaption("RotamoveOffset",0) = .FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveOffsetX,.Layers.Item(9).RotamoveOffsetY)
		.ExtraCaption("RotamoveOffset",5) = 54
		.ExtraCaption("Offset",0) = .FormatABC("` Offset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).OffsetX,.Layers.Item(9).OffsetY)
		.ExtraCaption("Offset",5) = 72
		.ExtraCaption("Client",0) = .FormatABC("`<sha ;;0><font ;12><b>` + ((100 - value) format ``)",Gauge1.Value)
		.ExtraCaption("Client",4) = .FormatABC("value - 12",.Item(9).LayerToClientX(.Layers.RotamoveCenterX,.RotamoveCenterY))
		.ExtraCaption("Client",5) = .FormatABC("value - 36",.Item(9).LayerToClientY(.Layers.RotamoveCenterX,.RotamoveCenterY))
		.Layers.Item(3).Clip.Value = Gauge1.Layers.Item(9).RotateAngle
		.Layers.Item(4).Clip.Value = Gauge1.Layers.Item(3).Clip.Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = .FormatABC("100 - value - B",.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 11
		.AllowSmoothChange = 0
		With .Layers.Item(9)
			.DefaultRotateAngle = -126
			.OnDrag = 3
			.RotateAngleToValue = "100 - value / 360 * 100"
			.ValueToRotateAngle = "(value)/100 * 360"
		End With
		.Layers.Item(3).Clip.Pie.SweepAngle = "value"
		.Layers.Item(4).Clip.Pie.SweepAngle = Gauge1.Layers.Item(3).Clip.Pie.SweepAngle
		.Layers.Item(9).Value = 25
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

32:
Can I move one or more layers at once

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item(3).Brightness(1) = Gauge1.FormatABC("100 - value ",Gauge1.Value)
		.Layers.Item(4).Brightness(1) = Gauge1.Layers.Item(3).Brightness(1)
		.Caption(0) = .FormatABC("` Value: <b>` + (100 - value format ``)",.Layers.Item(9).Value)
		.ExtraCaption("RotateAngle",0) = .FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",.Layers.Item(9).RotateAngle)
		.ExtraCaption("RotateAngle",5) = 18
		.ExtraCaption("RotamoveCenter",0) = .FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveCenterX,.Layers.Item(9).RotamoveCenterY)
		.ExtraCaption("RotamoveCenter",5) = 36
		.ExtraCaption("RotamoveOffset",0) = .FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveOffsetX,.Layers.Item(9).RotamoveOffsetY)
		.ExtraCaption("RotamoveOffset",5) = 54
		.ExtraCaption("Offset",0) = .FormatABC("` Offset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).OffsetX,.Layers.Item(9).OffsetY)
		.ExtraCaption("Offset",5) = 72
		.Layers.Item(10).RotateAngle = Gauge1.Layers.Item(9).RotateAngle
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DblClick(Shift,X,Y)
	With Gauge1
		.Value = 0
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise )
	' ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `` ", DragInfo.CumulativeRotateAngle )
	With Gauge1
		alert( DragInfo )
		.ExtraCaption("Clockwise",5) = 90
		.ExtraCaption("Cumulative",5) = 108
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragEnd(DragInfo,Cancel)
	With Gauge1
		.ExtraCaption("Clockwise",0) = ""
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug  = 227
	' DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
	With Gauge1
		.ExtraCaption("Clockwise",0) = ""
		.ExtraCaption("Cumulative",0) = ""
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = .FormatABC("100 - A - B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.DefaultLayer(185) = 2
		.Layers.Count = 11
		.AllowSmoothChange = 0
		With .Layers.Item(9)
			.OnDrag = 3
			.DefaultRotateAngle = -126
			.RotateAngleToValue = "100 - (value ) / 360 * 100"
			.ValueToRotateAngle = "(value)/100 * 360"
		End With
		With .Layers.Item(10)
			.Grayscale = True
			.Transparency = 25
			.DefaultRotateAngle = -69.5
			.RotateAngleToValue = "100 - (value ) / 360 * 100"
			.ValueToRotateAngle = "(value 1)/100 * 360"
			.Background.Picture.Value = "Highlighted_Layer4.png"
		End With
		With .Layers.Item(3)
			.Brightness(0) = 0
			.Brightness(1) = 0
		End With
		With .Layers.Item(4)
			.Brightness(0) = 0
			.Brightness(1) = 0
		End With
		.LayerOfValue = 9
		.Value = 5
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item(3).Transparency = Gauge1.Value
		.Layers.Item(4).Transparency = Gauge1.Value
		.Caption(0) = .FormatABC("` Value: <b>` + (100 - value format ``)",.Layers.Item(9).Value)
		.ExtraCaption("RotateAngle",0) = .FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",.Layers.Item(9).RotateAngle)
		.ExtraCaption("RotateAngle",5) = 18
		.ExtraCaption("RotamoveCenter",0) = .FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveCenterX,.Layers.Item(9).RotamoveCenterY)
		.ExtraCaption("RotamoveCenter",5) = 36
		.ExtraCaption("RotamoveOffset",0) = .FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveOffsetX,.Layers.Item(9).RotamoveOffsetY)
		.ExtraCaption("RotamoveOffset",5) = 54
		.ExtraCaption("Offset",0) = .FormatABC("` Offset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).OffsetX,.Layers.Item(9).OffsetY)
		.ExtraCaption("Offset",5) = 72
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DblClick(Shift,X,Y)
	With Gauge1
		.Value = 0
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = .FormatABC("100 - A - B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 11
		.AllowSmoothChange = 0
		With .Layers.Item(9)
			.OnDrag = 3
			.DefaultRotateAngle = -126
			.RotateAngleToValue = "100 - value / 360 * 100"
			.ValueToRotateAngle = "(value)/100 * 360"
			.Background.ExtraPicture("Aka").Value = "Highlighted_Layer4.png"
		End With
		With .Layers.Item(3)
			.Brightness(0) = 0
			.Brightness(1) = 100
		End With
		With .Layers.Item(4)
			.OnDrag = 3
			.Brightness(0) = 0
			.Brightness(1) = 100
		End With
		.Value = 15
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("` Value: <b>` + (100 - value format ``)",.Layers.Item(9).Value)
		.ExtraCaption("RotateAngle",0) = .FormatABC("` RotateAngle: <b>` + ( A format `` ) + ``",.Layers.Item(9).RotateAngle)
		.ExtraCaption("RotateAngle",5) = 18
		.ExtraCaption("RotamoveCenter",0) = .FormatABC("` RotamoveCenter: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveCenterX,.Layers.Item(9).RotamoveCenterY)
		.ExtraCaption("RotamoveCenter",5) = 36
		.ExtraCaption("RotamoveOffset",0) = .FormatABC("` RotamoveOffset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).RotamoveOffsetX,.Layers.Item(9).RotamoveOffsetY)
		.ExtraCaption("RotamoveOffset",5) = 54
		.ExtraCaption("Offset",0) = .FormatABC("` Offset: <b> (` + A + `,` + B + `)`",.Layers.Item(9).OffsetX,.Layers.Item(9).OffsetY)
		.ExtraCaption("Offset",5) = 72
		.ExtraCaption("Client",0) = .FormatABC("`<sha ;;0><font ;12><b>` + (100 - value format `0`)",Gauge1.Value)
		.ExtraCaption("Client",4) = .FormatABC("value - 8",Gauge1.Layers.Item(9).LayerToClientX(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
		.ExtraCaption("Client",5) = .FormatABC("value - 26",Gauge1.Layers.Item(9).LayerToClientY(Gauge1.Layers.Item(9).RotamoveCenterX,Gauge1.Layers.Item(9).RotamoveCenterY))
		.Layers.Item(7).RotateAngle = Gauge1.Layers.Item(0).RotateAngle
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = .FormatABC("100 - A - B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + str(value + 1) + `.png`"
		.Layers.Count = 11
		.AllowSmoothChange = 0
		With .Layers.Item(9)
			.DefaultRotateAngle = -126
			.OnDrag = 3
			.RotateAngleToValue = "100 - (value / 360 * 100)"
			.ValueToRotateAngle = "(value)/100 * 360"
			.ValueToOffsetX = "value"
			.OffsetToValue = "value"
			.RotateAngleValid = "int(value / 360 * 100)/100 * 360"
		End With
		.Layers.Item(3).Visible = False
		.Layers.Item(4).Visible = False
		With .Layers.Item(0)
			.OnDrag = 2
			.RotateType = 2
		End With
		With .Layers.Item(7)
			.OnDrag = 2
			.RotateType = 2
		End With
		.Value = 25
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

29:
How can I display an indicator

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(1).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",.Layers.Item(1).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator"
		.Layers.Count = 3
		.Layers.Item(0).Background.Picture.Name = "Background.png"
		With .Layers.Item(1)
			.Background.Picture.Name = "Green_Lights.png"
			With .Clip
				With .Rectangle
					.Height = "(100 - value)/100 * height"
					.InverseClip = True
				End With
				.Value = 50
			End With
		End With
		With .Layers.Item(2)
			.Visible = False
			.Background.Picture.Name = "overlay_top_layer.png"
		End With
	End With
End Function
</SCRIPT>
</BODY>

28:
How can I display a gauge

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item(1).Brightness(2) = Gauge1.Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Value = Gauge1.FormatABC("A - B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.BackColor = RGB(217,217,217)
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage"
		.Layers.Count = 2
		.AllowSmoothChange = 0
		With .Layers.Item(0)
			.RotateCenterY = "lheight/2 + 78"
			.Background.Picture.Name = "Guage_Background.png"
		End With
		With .Layers.Item(1)
			.OnDrag = 2
			.Background.Picture.Name = "Guage_Needle.png"
			.RotateAngleValid = "value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))"
			.RotateAngleToValue = "value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50"
			.ValueToRotateAngle = "value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90"
			.RotateType = 2
			.Brightness(0) = 0
		End With
		.Value = 78
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("sec").Value = Gauge1.Value
		.Layers.Item("min").Value = Gauge1.Value
		.Layers.Item("hour").Value = Gauge1.Value
		.Layers.Item("range").Clip.Value = Gauge1.Layers.Item("pointer").Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = -1
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		Gauge1.Layers.Item("pointer").Value = Gauge1.FormatABC("A - B",Gauge1.Layers.Item("pointer").Value,Delta)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Timer(TickCount)
	With Gauge1
		.Value = Gauge1.FormatABC(" date(`now`)")
		Gauge1.Layers.Item("pointer").Value = Gauge1.FormatABC("sin((value/100 mod 100)/100 * 2 * asin(1)) * 100",TickCount)
		.Layers.Item("range").Clip.Value = Gauge1.Layers.Item("pointer").Value
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf"
		.DefaultLayer(185) = 2
		.Layers.Count = 9
		With .Layers.Item(0)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Background.Picture.Name = "Back.png"
		End With
		With .Layers.Item(1)
			.Key = "scale"
			.DefaultOffsetX = -90
			.DefaultOffsetY = -150
			.Background.Picture.Name = "Scale.png"
			.RotateCenterLayer = 1
			.RotateCenterX = "(lwidth+181)/2"
			.RotateCenterY = "(lheight+232)/2"
		End With
		With .Layers.Item(2)
			.Key = "range"
			.DefaultOffsetX = Gauge1.Layers.Item("scale").DefaultOffsetX
			.DefaultOffsetY = Gauge1.Layers.Item("scale").DefaultOffsetY
			.RotateCenterLayer = Gauge1.Layers.Item("scale").Index
			With .Background.Picture
				.Name = "ScalePointerArc.png"
			End With
			.RotateCenterLayer = Gauge1.Layers.Item("scale").Index
			With .Clip.Pie
				.RadiusX = 100
				.RadiusY = 100
				.CenterX = Gauge1.Layers.Item("scale").RotateCenterX
				.CenterY = Gauge1.Layers.Item("scale").RotateCenterY
				.StartAngle = -148
				.SweepAngle = "value/100 * 300"
			End With
		End With
		With .Layers.Item(3)
			.Key = "pointer"
			.DefaultOffsetX = Gauge1.Layers.Item("scale").DefaultOffsetX
			.DefaultOffsetY = Gauge1.Layers.Item("scale").DefaultOffsetY
			With .Background.Picture
				.Name = "ScalePointer.png"
			End With
			.RotateCenterLayer = Gauge1.Layers.Item("scale").Index
			.OnDrag = 2
			.DefaultRotateAngle = -148
			.RotateAngleValid = "value > 300 ? (value > 330 ? 0 : 300) : value"
			.RotateAngleToValue = "value / 300 * 100"
			.ValueToRotateAngle = "value /100 * 300"
		End With
		With .Layers.Item(4)
			.Key = "bolt"
			.DefaultOffsetX = Gauge1.Layers.Item("scale").DefaultOffsetX
			.DefaultOffsetY = Gauge1.Layers.Item("scale").DefaultOffsetY
			With .Background.Picture
				.Name = "Bolt.png"
			End With
		End With
		With .Layers.Item(5)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "sec"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "second-hand.png"
			.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"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(6)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "min"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "Minute.png"
			.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(" & _
	"=:1)) * 360"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(7)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "hour"
			.OnDrag = 2
			.Background.Picture.Name = "Hour.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		With .Layers.Item(8)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "front"
			.OnDrag = 2
			.Background.Picture.Name = "front.png"
		End With
		.LayerOfValue = Gauge1.Layers.Item("hour").Index
		.Value = .FormatABC("date(`now`)")
		.TimerInterval = 100
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("sec").Value = Gauge1.Value
		.Layers.Item("min").Value = Gauge1.Value
		.Layers.Item("hour").Value = Gauge1.Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		Gauge1.Value = Gauge1.FormatABC("A - 1/24/60/60*B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Timer(TickCount)
	With Gauge1
		.Value = .FormatABC("value + 1/24/60/60",.Value)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage"
		.DefaultLayer(185) = 2
		.Layers.Count = 5
		With .Layers.Item(0)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Background.Picture.Name = "Back.png"
		End With
		With .Layers.Item(1)
			.Position = 3
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "sec"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "second-hand.png"
			.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"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(2)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 2
			.Key = "min"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "Minute.png"
			.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(" & _
	"=:1)) * 360"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(3)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 1
			.Key = "hour"
			.OnDrag = 2
			.Background.Picture.Name = "Hour.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		With .Layers.Item(4)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 1
			.Key = "front"
			.OnDrag = 2
			.Background.Picture.Name = "front.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		.LayerOfValue = 3
		.Value = .FormatABC("date(`now`)")
		.TimerInterval = 1000
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("sec").Value = Gauge1.Value
		.Layers.Item("min").Value = Gauge1.Value
		.Layers.Item("hour").Value = Gauge1.Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		Gauge1.Value = Gauge1.FormatABC("A - 1/24/60/60*B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Timer(TickCount)
	With Gauge1
		.Value = Gauge1.FormatABC("value + 1/24/60/60",.Value)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London"
		.DefaultLayer(185) = 2
		.Layers.Count = 6
		With .Layers.Item(0)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Background.Picture.Name = "Back.png"
		End With
		With .Layers.Item(1)
			.Position = 3
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "sec"
			.OnDrag = 2
			.Selectable = False
			.RotateCenterLayer = 1
			.Background.Picture.Name = "second-hand.png"
			.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"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(2)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 2
			.RotateCenterLayer = 2
			.Key = "min"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "Minute.png"
			.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(" & _
	"=:1)) * 360"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(3)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 1
			.Key = "hour"
			.RotateCenterLayer = 3
			.OnDrag = 2
			.Background.Picture.Name = "Hour.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		With .Layers.Item(4)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Position = 1
			.Key = "front"
			.RotateCenterLayer = 4
			.OnDrag = 2
			.Background.Picture.Name = "front.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		With .Layers.Item(5)
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			.Key = "bolt"
			.RotateCenterLayer = 5
			.Background.Picture.Name = "Bolt.png"
		End With
		.LayerOfValue = Gauge1.Layers.Item("hour").Index
		.Value = Gauge1.FormatABC("date(`now`)")
		.TimerInterval = 1000
	End With
End Function
</SCRIPT>
</BODY>

24:
How can I display a clock (rotate)

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("sec").Value = Gauge1.Value
		.Layers.Item("min").Value = Gauge1.Value
		.Layers.Item("hour").Value = Gauge1.Value
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		Gauge1.Value = Gauge1.FormatABC("A - 1/24/60/60*B",Gauge1.Value,Delta)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Timer(TickCount)
	With Gauge1
		.Value = .FormatABC("value + 1/24/60/60",.Value)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock"
		.DefaultLayer(185) = 2
		.Layers.Count = 4
		With .Layers.Item(0)
			.Background.Picture.Name = "vista_clock.png"
		End With
		With .Layers.Item(1)
			.Position = 3
			.Key = "sec"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "second-hand.png"
			.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"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(2)
			.Position = 2
			.Key = "min"
			.OnDrag = 2
			.Selectable = False
			.Background.Picture.Name = "Minute.png"
			.ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(" & _
	"=:1)) * 360"
			.RotateAngleToValue = "value / 360 / 24 / 60"
		End With
		With .Layers.Item(3)
			.Position = 1
			.Key = "hour"
			.OnDrag = 2
			.Background.Picture.Name = "Hour.png"
			.ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
			.RotateAngleToValue = "value / 360 * 0.5"
		End With
		.LayerOfValue = 3
		.Value = .FormatABC("date(`now`)")
		.TimerInterval = 1000
	End With
End Function
</SCRIPT>
</BODY>

23:
How can I clip as a triangle

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			With .Clip
				With .Polygon
					.Points = 3
					.X(0) = 0
					.Y(0) = "height"
					.X(1) = "width/2"
					.Y(1) = "value/100*width"
					.X(2) = "width"
					.Y(2) = "height"
					.InverseClip = True
				End With
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

22:
How can I limit the rotation from 0 to 360 degree, while dragging
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
	' DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.RotateType = 2
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngle = -45
		End With
	End With
End Function
</SCRIPT>
</BODY>

21:
How can I clip as a pie

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = -1
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Left = "(width-128)/2"
			.Top = "(height-128)/2"
			.Height = 128
			.Width = 128
			.Background.Color.Value = RGB(0,255,0)
			With .Clip
				With .Pie
					.InverseClip = True
					.StartAngle = 0
					.SweepAngle = "value/100*360"
				End With
				.Value = 15
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Layers.Item("Clip").Clip.Value = Gauge1.Layers.Item("Thumb").RotateAngle
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.BeginUpdate 
		.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 5
		With .Layers.Item(4)
			.Key = "Thumb"
			.DefaultRotateAngle = -141
			.OnDrag = 2
			.RotateType = 2
		End With
		With .Layers.Item(1)
			.Key = "Clip"
			With .Clip
				.Pie.SweepAngle = "value"
				With .Picture
					.Name = Gauge1.Layers.Item("Clip").Background.Picture.Name
					.AlphaTo = "128"
				End With
			End With
		End With
		.Layers.Item("Thumb").RotateAngle = 90
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

19:
How do I clip a circle/ellipse

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Left = "(width-128)/2"
			.Top = "(height-128)/2"
			.Height = 128
			.Width = 128
			.Background.Color.Value = RGB(0,255,0)
			With .Clip
				.Ellipse.RadiusX = "value/100 * width"
				.Value = 25
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

18:
What InverseClip does

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Left = "(width-128)/2"
			.Top = "(height-128)/2"
			.Height = 128
			.Width = 128
			.Background.Color.Value = RGB(0,255,0)
			With .Clip
				With .RoundRectangle
					.Width = "value/100 * width"
					.RoundRadiusX = "width/8"
					.RoundRadiusY = "height/8"
					.InverseClip = True
				End With
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Left = "(width-128)/2"
			.Top = "(height-128)/2"
			.Height = 128
			.Width = 128
			.Background.Color.Value = RGB(0,255,0)
			With .Clip
				With .RoundRectangle
					.Width = "value/100 * width"
					.RoundRadiusX = "width/8"
					.RoundRadiusY = "height/8"
				End With
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			With .Clip
				With .Rectangle
					.Height = "value/100 * height"
					.InverseClip = True
				End With
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			With .Clip
				.Rectangle.Height = "value/100 * height"
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			With .Clip
				With .Rectangle
					.Width = "value/100 * width"
					.InverseClip = True
				End With
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Drag(DragInfo)
	' Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX )
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug= 287
	With Gauge1
		With .Layers.Item(0)
			.UserData = .Clip.Value
		End With
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_MouseWheel(Delta)
	With Gauge1
		.Layers.Item(0).Clip.Value = Gauge1.FormatABC("(value + B) MIN 0 MAX 100",Gauge1.Layers.Item(0).Clip.Value,Delta)
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			With .Clip
				.Rectangle.Width = "value/100 * width"
				.Value = 50
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

12:
How can I associate a value to rotation angle

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("`Value: <b>` + (value format ``) ",.Layers.Item(0).Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.RotateType = 2
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.DefaultRotateAngle = 45
			.RotateCenterY = "lheight/2 + 32"
			.RotateCenterX = "lwidth/2 + 32"
			.RotateAngleToValue = "value/360 * 100"
			.ValueToRotateAngle = "value / 100 * 360"
			.Value = 50
		End With
	End With
End Function
</SCRIPT>
</BODY>

11:
How can I associate a value to vertical offset

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("`Value: <b>` + (value format ``)",.Layers.Item(0).Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 287
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
			.DefaultOffsetY = -100
			.OffsetYValid = "value MIN 0 MAX 200"
			.OffsetXValid = 0
			.OffsetToValue = "offsety /200 * 100"
			.ValueToOffsetY = "value / 100 * 200"
			.Value = 50
		End With
	End With
End Function
</SCRIPT>
</BODY>

10:
How can I associate a value to horizontal offset

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("`Value: <b>` + (value format ``)",.Layers.Item(0).Value)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 287
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
			.DefaultOffsetX = -100
			.OffsetXValid = "value MIN 0 MAX 200"
			.OffsetYValid = 0
			.OffsetToValue = "offsetx /200 * 100"
			.ValueToOffsetX = "value / 100 * 200"
			.Value = 50
		End With
	End With
End Function
</SCRIPT>
</BODY>

9:
How can I display the current angle

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("`Angle: <b>` + (value format ``) + ``",.Layers.Item(0).RotateAngle)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.RotateType = 2
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngleValid = "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"
		End With
	End With
End Function
</SCRIPT>
</BODY>

8:
How can I limit the rotation angle

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_Change(Layer)
	With Gauge1
		.Caption(0) = .FormatABC("`Angle: <b>` + (value format ``) + ``",.Layers.Item(0).RotateAngle)
	End With
End Function
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.RotateType = 2
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngleValid = "(value > 180 ? value - 360 : value)  MIN 15 MAX 65"
		End With
	End With
End Function
</SCRIPT>
</BODY>

7:
Can I specify a different center while rotating

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.RotateType = 2
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngle = -45
			.RotateCenterY = "lheight/2 + 32"
			.RotateCenterX = "lwidth/2 + 32"
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Left = "(width-512)/2"
			.Top = "(height-512)/2"
			.Height = 512
			.Width = 512
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Left = "(width-pwidth)/2"
				.Top = "(height-pheight)/2"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngle = -45
		End With
	End With
End Function
</SCRIPT>
</BODY>

5:
How can I rotate a layer

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 483
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			With .Background.Picture
				.Value = "c:\exontrol\images\card.png"
				.Width = "pwidth"
				.Height = "pheight"
			End With
			.OnDrag = 2
			.RotateAngle = 45
		End With
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Gauge1_DragStart(DragInfo,Cancel)
	' DragInfo.Debug = 287
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
		End With
	End With
End Function
</SCRIPT>
</BODY>

3:
How do I specify where to move the layer, while dragging
<BODY onload="Init()">
<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
			.OffsetXValid = "int(value / 64) * 64"
			.OffsetYValid = "int(value / 64) * 64"
		End With
	End With
End Function
</SCRIPT>
</BODY>

2:
How can I add layers to the control
<BODY onload="Init()">
<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		With .Layers.Add("back")
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
		End With
	End With
End Function
</SCRIPT>
</BODY>

1:
How can I add layers to the control
<BODY onload="Init()">
<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.Layers.Count = 1
		With .Layers.Item(0)
			.Background.Picture.Value = "c:\exontrol\images\card.png"
			.OnDrag = 1
		End With
	End With
End Function
</SCRIPT>
</BODY>