Type | Description | |||
Layer as Long | A long expression that specifies the index of the layer where the cursor is entering. The Item property of Layers collection gets the layer based on its index. |
Syntax for MouseIn event, /NET version, on:
private void MouseIn(object sender,int Layer) { } Private Sub MouseIn(ByVal sender As System.Object,ByVal Layer As Integer) Handles MouseIn End Sub |
private void MouseIn(object sender, AxEXGAUGELib._IGaugeEvents_MouseInEvent e) { } void OnMouseIn(long Layer) { } void __fastcall MouseIn(TObject *Sender,long Layer) { } procedure MouseIn(ASender: TObject; Layer : Integer); begin end; procedure MouseIn(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseInEvent); begin end; begin event MouseIn(long Layer) end event MouseIn Private Sub MouseIn(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseInEvent) Handles MouseIn End Sub Private Sub MouseIn(ByVal Layer As Long) End Sub Private Sub MouseIn(ByVal Layer As Long) End Sub LPARAMETERS Layer PROCEDURE OnMouseIn(oGauge,Layer) RETURN |
<SCRIPT EVENT="MouseIn(Layer)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function MouseIn(Layer) End Function </SCRIPT> Procedure OnComMouseIn Integer llLayer Forward Send OnComMouseIn llLayer End_Procedure METHOD OCX_MouseIn(Layer) CLASS MainDialog RETURN NIL void onEvent_MouseIn(int _Layer) { } function MouseIn as v (Layer as N) end function function nativeObject_MouseIn(Layer) return |
The following samples shows how you can change the layer's brightness when the cursor enters / leaves the layer:
VBA (MS Access, Excell...)
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Gauge1_MouseIn(ByVal Layer As Long) With Gauge1 With .Layers.Item(Layer) .Brightness(1) = 100 .Brightness(2) = 0 .Brightness(3) = 0 End With End With End Sub ' MouseOut event - Notifies that the cursor exits the layer. Private Sub Gauge1_MouseOut(ByVal Layer As Long) 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 Sub With Gauge1 .DefaultLayer(128) = 51 .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 End With
VB6
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Gauge1_MouseIn(ByVal Layer As Long) With Gauge1 With .Layers.Item(Layer) .Brightness(exRedChannel) = 100 .Brightness(exGreenChannel) = 0 .Brightness(exBlueChannel) = 0 End With End With End Sub ' MouseOut event - Notifies that the cursor exits the layer. Private Sub Gauge1_MouseOut(ByVal Layer As Long) With Gauge1 With .Layers.Item(Layer) .Brightness(exRedChannel) = Gauge1.DefaultLayer(exDefLayerBrightness) .Brightness(exGreenChannel) = Gauge1.DefaultLayer(exDefLayerBrightness) .Brightness(exBlueChannel) = Gauge1.DefaultLayer(exDefLayerBrightness) End With End With End Sub With Gauge1 .DefaultLayer(exDefLayerBrightness) = 51 .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 End With
VB.NET
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Exgauge1_MouseIn(ByVal sender As System.Object,ByVal Layer As Integer) Handles Exgauge1.MouseIn With Exgauge1 With .Layers.Item(Layer) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,100) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,0) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,0) End With End With End Sub ' MouseOut event - Notifies that the cursor exits the layer. Private Sub Exgauge1_MouseOut(ByVal sender As System.Object,ByVal Layer As Integer) Handles Exgauge1.MouseOut With Exgauge1 With .Layers.Item(Layer) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,Exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,Exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)) .set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,Exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)) End With End With End Sub With Exgauge1 .set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,51) .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 End With
VB.NET for /COM
' MouseIn event - Notifies that the cursor enters the layer. Private Sub AxGauge1_MouseIn(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseInEvent) Handles AxGauge1.MouseIn With AxGauge1 With .Layers.Item(e.layer) .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel) = 100 .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel) = 0 .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel) = 0 End With End With End Sub ' MouseOut event - Notifies that the cursor exits the layer. Private Sub AxGauge1_MouseOut(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseOutEvent) Handles AxGauge1.MouseOut With AxGauge1 With .Layers.Item(e.layer) .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel) = AxGauge1.DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness) .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel) = AxGauge1.DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness) .Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel) = AxGauge1.DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness) End With End With End Sub With AxGauge1 .set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,51) .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 End With
C++
// MouseIn event - Notifies that the cursor enters the layer. void OnMouseInGauge1(long Layer) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGAUGELib' for the library: 'ExGauge 1.0 Control Library' #import <ExGauge.dll> using namespace EXGAUGELib; */ EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown(); EXGAUGELib::ILayerPtr var_Layer = spGauge1->GetLayers()->GetItem(Layer); var_Layer->PutBrightness(EXGAUGELib::exRedChannel,100); var_Layer->PutBrightness(EXGAUGELib::exGreenChannel,0); var_Layer->PutBrightness(EXGAUGELib::exBlueChannel,0); } // MouseOut event - Notifies that the cursor exits the layer. void OnMouseOutGauge1(long Layer) { EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown(); EXGAUGELib::ILayerPtr var_Layer = spGauge1->GetLayers()->GetItem(Layer); var_Layer->PutBrightness(EXGAUGELib::exRedChannel,spGauge1->GetDefaultLayer(EXGAUGELib::exDefLayerBrightness)); var_Layer->PutBrightness(EXGAUGELib::exGreenChannel,spGauge1->GetDefaultLayer(EXGAUGELib::exDefLayerBrightness)); var_Layer->PutBrightness(EXGAUGELib::exBlueChannel,spGauge1->GetDefaultLayer(EXGAUGELib::exDefLayerBrightness)); } EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown(); spGauge1->PutDefaultLayer(EXGAUGELib::exDefLayerBrightness,long(51)); spGauge1->PutPicturesPath(L"C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"); spGauge1->PutPicturesName(L"`Layer` + int(value + 1) + `.png`"); spGauge1->GetLayers()->PutCount(1);
C++ Builder
// MouseIn event - Notifies that the cursor enters the layer. void __fastcall TForm1::Gauge1MouseIn(TObject *Sender,long Layer) { Exgaugelib_tlb::ILayerPtr var_Layer = Gauge1->Layers->get_Item(TVariant(Layer)); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exRedChannel,100); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exGreenChannel,0); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exBlueChannel,0); } // MouseOut event - Notifies that the cursor exits the layer. void __fastcall TForm1::Gauge1MouseOut(TObject *Sender,long Layer) { Exgaugelib_tlb::ILayerPtr var_Layer = Gauge1->Layers->get_Item(TVariant(Layer)); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exRedChannel,Gauge1->get_DefaultLayer(Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerBrightness)); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exGreenChannel,Gauge1->get_DefaultLayer(Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerBrightness)); var_Layer->set_Brightness(Exgaugelib_tlb::ColorAdjustmentChannelEnum::exBlueChannel,Gauge1->get_DefaultLayer(Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerBrightness)); } Gauge1->DefaultLayer[Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerBrightness] = TVariant(51); Gauge1->PicturesPath = L"C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; Gauge1->PicturesName = L"`Layer` + int(value + 1) + `.png`"; Gauge1->Layers->Count = 1;
C#
// MouseIn event - Notifies that the cursor enters the layer. private void exgauge1_MouseIn(object sender,int Layer) { exontrol.EXGAUGELib.Layer var_Layer = exgauge1.Layers[Layer]; var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,100); var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,0); var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,0); } //this.exgauge1.MouseIn += new exontrol.EXGAUGELib.exg2antt.MouseInEventHandler(this.exgauge1_MouseIn); // MouseOut event - Notifies that the cursor exits the layer. private void exgauge1_MouseOut(object sender,int Layer) { exontrol.EXGAUGELib.Layer var_Layer = exgauge1.Layers[Layer]; var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); var_Layer.set_Brightness(exontrol.EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,exgauge1.get_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); } //this.exgauge1.MouseOut += new exontrol.EXGAUGELib.exg2antt.MouseOutEventHandler(this.exgauge1_MouseOut); exgauge1.set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,51); exgauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; exgauge1.PicturesName = "`Layer` + int(value + 1) + `.png`"; exgauge1.Layers.Count = 1;
JScript/JavaScript
<BODY onload="Init()"> <SCRIPT FOR="Gauge1" EVENT="MouseIn(Layer)" LANGUAGE="JScript"> var var_Layer = Gauge1.Layers.Item(Layer); var_Layer.Brightness(1) = 100; var_Layer.Brightness(2) = 0; var_Layer.Brightness(3) = 0; </SCRIPT> <SCRIPT FOR="Gauge1" EVENT="MouseOut(Layer)" LANGUAGE="JScript"> var var_Layer = Gauge1.Layers.Item(Layer); var_Layer.Brightness(1) = Gauge1.DefaultLayer(128); var_Layer.Brightness(2) = Gauge1.DefaultLayer(128); var_Layer.Brightness(3) = Gauge1.DefaultLayer(128); </SCRIPT> <OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { Gauge1.DefaultLayer(128) = 51; Gauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; Gauge1.PicturesName = "`Layer` + int(value + 1) + `.png`"; Gauge1.Layers.Count = 1; } </SCRIPT> </BODY>
VBScript
<BODY onload="Init()"> <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> <OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With Gauge1 .DefaultLayer(128) = 51 .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 End With End Function </SCRIPT> </BODY>
C# for /COM
// MouseIn event - Notifies that the cursor enters the layer. private void axGauge1_MouseIn(object sender, AxEXGAUGELib._IGaugeEvents_MouseInEvent e) { EXGAUGELib.Layer var_Layer = axGauge1.Layers[e.layer]; var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,100); var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,0); var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,0); } //this.axGauge1.MouseIn += new AxEXGAUGELib._IGaugeEvents_MouseInEventHandler(this.axGauge1_MouseIn); // MouseOut event - Notifies that the cursor exits the layer. private void axGauge1_MouseOut(object sender, AxEXGAUGELib._IGaugeEvents_MouseOutEvent e) { EXGAUGELib.Layer var_Layer = axGauge1.Layers[e.layer]; var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel,axGauge1.get_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel,axGauge1.get_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); var_Layer.set_Brightness(EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel,axGauge1.get_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness)); } //this.axGauge1.MouseOut += new AxEXGAUGELib._IGaugeEvents_MouseOutEventHandler(this.axGauge1_MouseOut); axGauge1.set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,51); axGauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; axGauge1.PicturesName = "`Layer` + int(value + 1) + `.png`"; axGauge1.Layers.Count = 1;
X++ (Dynamics Ax 2009)
// MouseIn event - Notifies that the cursor enters the layer. void onEvent_MouseIn(int _Layer) { COM com_Layer; anytype var_Layer; ; var_Layer = COM::createFromObject(exgauge1.Layers()).Item(_Layer); com_Layer = var_Layer; com_Layer.Brightness(1/*exRedChannel*/,100); com_Layer.Brightness(2/*exGreenChannel*/,0); com_Layer.Brightness(3/*exBlueChannel*/,0); } // MouseOut event - Notifies that the cursor exits the layer. void onEvent_MouseOut(int _Layer) { COM com_Layer; anytype var_Layer; ; var_Layer = COM::createFromObject(exgauge1.Layers()).Item(_Layer); com_Layer = var_Layer; com_Layer.Brightness(1/*exRedChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/)); com_Layer.Brightness(2/*exGreenChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/)); com_Layer.Brightness(3/*exBlueChannel*/,exgauge1.DefaultLayer(128/*exDefLayerBrightness*/)); } public void init() { COM com_Layer; anytype var_Layer; ; super(); exgauge1.DefaultLayer(128/*exDefLayerBrightness*/,COMVariant::createFromInt(51)); exgauge1.PicturesPath("C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"); exgauge1.PicturesName("`Layer` + int(value + 1) + `.png`"); exgauge1.Layers().Count(1); }
Delphi 8 (.NET only)
// MouseIn event - Notifies that the cursor enters the layer. procedure TWinForm1.AxGauge1_MouseIn(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseInEvent); begin with AxGauge1 do begin with Layers.Item[TObject(e.layer)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := 0; end; end end; // MouseOut event - Notifies that the cursor exits the layer. procedure TWinForm1.AxGauge1_MouseOut(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseOutEvent); begin with AxGauge1 do begin with Layers.Item[TObject(e.layer)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; end; end end; with AxGauge1 do begin set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,TObject(51)); PicturesPath := 'C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 1; end
Delphi (standard)
// MouseIn event - Notifies that the cursor enters the layer. procedure TForm1.Gauge1MouseIn(ASender: TObject; Layer : Integer); begin with Gauge1 do begin with Layers.Item[OleVariant(Layer)] do begin Brightness[EXGAUGELib_TLB.exRedChannel] := 100; Brightness[EXGAUGELib_TLB.exGreenChannel] := 0; Brightness[EXGAUGELib_TLB.exBlueChannel] := 0; end; end end; // MouseOut event - Notifies that the cursor exits the layer. procedure TForm1.Gauge1MouseOut(ASender: TObject; Layer : Integer); begin with Gauge1 do begin with Layers.Item[OleVariant(Layer)] do begin Brightness[EXGAUGELib_TLB.exRedChannel] := Gauge1.DefaultLayer[EXGAUGELib_TLB.exDefLayerBrightness]; Brightness[EXGAUGELib_TLB.exGreenChannel] := Gauge1.DefaultLayer[EXGAUGELib_TLB.exDefLayerBrightness]; Brightness[EXGAUGELib_TLB.exBlueChannel] := Gauge1.DefaultLayer[EXGAUGELib_TLB.exDefLayerBrightness]; end; end end; with Gauge1 do begin DefaultLayer[EXGAUGELib_TLB.exDefLayerBrightness] := OleVariant(51); PicturesPath := 'C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 1; end
VFP
*** MouseIn event - Notifies that the cursor enters the layer. *** LPARAMETERS Layer with thisform.Gauge1 with .Layers.Item(Layer) .Brightness(1) = 100 .Brightness(2) = 0 .Brightness(3) = 0 endwith endwith *** MouseOut event - Notifies that the cursor exits the layer. *** LPARAMETERS Layer with thisform.Gauge1 with .Layers.Item(Layer) .Brightness(1) = thisform.Gauge1.DefaultLayer(128) .Brightness(2) = thisform.Gauge1.DefaultLayer(128) .Brightness(3) = thisform.Gauge1.DefaultLayer(128) endwith endwith with thisform.Gauge1 .Object.DefaultLayer(128) = 51 .PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + int(value + 1) + `.png`" .Layers.Count = 1 endwith
dBASE Plus
/* with (this.EXGAUGEACTIVEXCONTROL1.nativeObject) MouseIn = class::nativeObject_MouseIn endwith */ // Notifies that the cursor enters the layer. function nativeObject_MouseIn(Layer) local var_Layer oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject var_Layer = oGauge.Layers.Item(Layer) // var_Layer.Brightness(1) = 100 with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(1) = 100] endwith // var_Layer.Brightness(2) = 0 with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(2) = 0] endwith // var_Layer.Brightness(3) = 0 with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(3) = 0] endwith return /* with (this.EXGAUGEACTIVEXCONTROL1.nativeObject) MouseOut = class::nativeObject_MouseOut endwith */ // Notifies that the cursor exits the layer. function nativeObject_MouseOut(Layer) local var_Layer oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject var_Layer = oGauge.Layers.Item(Layer) // var_Layer.Brightness(1) = oGauge.DefaultLayer(128) with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(1) = Me.DefaultLayer(128)] endwith // var_Layer.Brightness(2) = oGauge.DefaultLayer(128) with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(2) = Me.DefaultLayer(128)] endwith // var_Layer.Brightness(3) = oGauge.DefaultLayer(128) with (oGauge) TemplateDef = [dim var_Layer] TemplateDef = var_Layer Template = [var_Layer.Brightness(3) = Me.DefaultLayer(128)] endwith return local oGauge oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject oGauge.Template = [DefaultLayer(128) = 51] // oGauge.DefaultLayer(128) = 51 oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + int(value + 1) + `.png`" oGauge.Layers.Count = 1
XBasic (Alpha Five)
' Notifies that the cursor enters the layer. function MouseIn as v (Layer as N) Dim var_Layer as P oGauge = topparent:CONTROL_ACTIVEX1.activex var_Layer = oGauge.Layers.Item(Layer) ' var_Layer.Brightness(1) = 100 oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(1) = 100" ' var_Layer.Brightness(2) = 0 oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(2) = 0" ' var_Layer.Brightness(3) = 0 oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(3) = 0" end function ' Notifies that the cursor exits the layer. function MouseOut as v (Layer as N) Dim var_Layer as P oGauge = topparent:CONTROL_ACTIVEX1.activex var_Layer = oGauge.Layers.Item(Layer) ' var_Layer.Brightness(1) = oGauge.DefaultLayer(128) oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(1) = Me.DefaultLayer(128)" ' var_Layer.Brightness(2) = oGauge.DefaultLayer(128) oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(2) = Me.DefaultLayer(128)" ' var_Layer.Brightness(3) = oGauge.DefaultLayer(128) oGauge.TemplateDef = "dim var_Layer" oGauge.TemplateDef = var_Layer oGauge.Template = "var_Layer.Brightness(3) = Me.DefaultLayer(128)" end function Dim oGauge as P oGauge = topparent:CONTROL_ACTIVEX1.activex oGauge.Template = "DefaultLayer(128) = 51" // oGauge.DefaultLayer(128) = 51 oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + int(value + 1) + `.png`" oGauge.Layers.Count = 1
Visual Objects
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 oDCOCX_Exontrol1:[DefaultLayer,exDefLayerBrightness] := 51 oDCOCX_Exontrol1:PicturesPath := "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" oDCOCX_Exontrol1:PicturesName := "`Layer` + int(value + 1) + `.png`" oDCOCX_Exontrol1:Layers:Count := 1
PowerBuilder
/*begin event MouseIn(long Layer) - Notifies that the cursor enters the layer.*/ /* OleObject var_Layer oGauge = ole_1.Object var_Layer = oGauge.Layers.Item(Layer) var_Layer.Brightness(1,100) var_Layer.Brightness(2,0) var_Layer.Brightness(3,0) */ /*end event MouseIn*/ /*begin event MouseOut(long Layer) - Notifies that the cursor exits the layer.*/ /* OleObject var_Layer oGauge = ole_1.Object var_Layer = oGauge.Layers.Item(Layer) var_Layer.Brightness(1,oGauge.DefaultLayer(128)) var_Layer.Brightness(2,oGauge.DefaultLayer(128)) var_Layer.Brightness(3,oGauge.DefaultLayer(128)) */ /*end event MouseOut*/ OleObject oGauge oGauge = ole_1.Object oGauge.DefaultLayer(128,51) oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + int(value + 1) + `.png`" oGauge.Layers.Count = 1
Visual DataFlex
// Notifies that the cursor enters the layer. Procedure OnComMouseIn Integer llLayer Forward Send OnComMouseIn llLayer Variant voLayers Get ComLayers to voLayers Handle hoLayers Get Create (RefClass(cComLayers)) to hoLayers Set pvComObject of hoLayers to voLayers Variant voLayer Get ComItem of hoLayers llLayer to voLayer Handle hoLayer Get Create (RefClass(cComLayer)) to hoLayer Set pvComObject of hoLayer to voLayer Set ComBrightness of hoLayer OLEexRedChannel to 100 Set ComBrightness of hoLayer OLEexGreenChannel to 0 Set ComBrightness of hoLayer OLEexBlueChannel to 0 Send Destroy to hoLayer Send Destroy to hoLayers End_Procedure // Notifies that the cursor exits the layer. Procedure OnComMouseOut Integer llLayer Forward Send OnComMouseOut llLayer Variant voLayers1 Get ComLayers to voLayers1 Handle hoLayers1 Get Create (RefClass(cComLayers)) to hoLayers1 Set pvComObject of hoLayers1 to voLayers1 Variant voLayer1 Get ComItem of hoLayers1 llLayer to voLayer1 Handle hoLayer1 Get Create (RefClass(cComLayer)) to hoLayer1 Set pvComObject of hoLayer1 to voLayer1 Variant v Get ComDefaultLayer OLEexDefLayerBrightness to v Set ComBrightness of hoLayer1 OLEexRedChannel to v Variant v1 Get ComDefaultLayer OLEexDefLayerBrightness to v1 Set ComBrightness of hoLayer1 OLEexGreenChannel to v1 Variant v2 Get ComDefaultLayer OLEexDefLayerBrightness to v2 Set ComBrightness of hoLayer1 OLEexBlueChannel to v2 Send Destroy to hoLayer1 Send Destroy to hoLayers1 End_Procedure Procedure OnCreate Forward Send OnCreate Set ComDefaultLayer OLEexDefLayerBrightness to 51 Set ComPicturesPath to "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" Set ComPicturesName to "`Layer` + int(value + 1) + `.png`" Variant voLayers2 Get ComLayers to voLayers2 Handle hoLayers2 Get Create (RefClass(cComLayers)) to hoLayers2 Set pvComObject of hoLayers2 to voLayers2 Set ComCount of hoLayers2 to 1 Send Destroy to hoLayers2 End_Procedure
XBase++
PROCEDURE OnMouseIn(oGauge,Layer) LOCAL oLayer oLayer := oGauge:Layers:Item(Layer) oLayer:SetProperty("Brightness",1/*exRedChannel*/,100) oLayer:SetProperty("Brightness",2/*exGreenChannel*/,0) oLayer:SetProperty("Brightness",3/*exBlueChannel*/,0) RETURN PROCEDURE OnMouseOut(oGauge,Layer) LOCAL oLayer oLayer := oGauge:Layers:Item(Layer) oLayer:SetProperty("Brightness",1/*exRedChannel*/,oGauge:DefaultLayer(128/*exDefLayerBrightness*/)) oLayer:SetProperty("Brightness",2/*exGreenChannel*/,oGauge:DefaultLayer(128/*exDefLayerBrightness*/)) oLayer:SetProperty("Brightness",3/*exBlueChannel*/,oGauge:DefaultLayer(128/*exDefLayerBrightness*/)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGauge oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGauge := XbpActiveXControl():new( oForm:drawingArea ) oGauge:CLSID := "Exontrol.Gauge.1" /*{91628F12-393C-44EF-A558-83ED1790AAD3}*/ oGauge:create(,, {10,60},{610,370} ) oGauge:MouseIn := {|Layer| OnMouseIn(oGauge,Layer)} /*Notifies that the cursor enters the layer.*/ oGauge:MouseOut := {|Layer| OnMouseOut(oGauge,Layer)} /*Notifies that the cursor exits the layer.*/ oGauge:SetProperty("DefaultLayer",128/*exDefLayerBrightness*/,51) oGauge:PicturesPath := "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge:PicturesName := "`Layer` + int(value + 1) + `.png`" oGauge:Layers():Count := 1 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN