Type | Description | |||
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys | |||
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates | |||
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates |
Use the DblClick event to notify your application that user double clicked the control. By default, the control selects the word from the cursor when the user double clicks the control's client area. The WordFromCursor(-1,-1) property indicates the word from the cursor.
Syntax for DblClick event, /NET version, on:
private void DblClick(object sender,short Shift,int X,int Y) { } Private Sub DblClick(ByVal sender As System.Object,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles DblClick End Sub |
private void DblClick(object sender, AxEXPRESSIONLib._IExpressionEvents_DblClickEvent e) { } void OnDblClick(short Shift,long X,long Y) { } void __fastcall DblClick(TObject *Sender,short Shift,int X,int Y) { } procedure DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer); begin end; procedure DblClick(sender: System.Object; e: AxEXPRESSIONLib._IExpressionEvents_DblClickEvent); begin end; begin event DblClick(integer Shift,long X,long Y) end event DblClick Private Sub DblClick(ByVal sender As System.Object, ByVal e As AxEXPRESSIONLib._IExpressionEvents_DblClickEvent) Handles DblClick End Sub Private Sub DblClick(Shift As Integer,X As Single,Y As Single) End Sub Private Sub DblClick(ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long) End Sub LPARAMETERS Shift,X,Y PROCEDURE OnDblClick(oExpression,Shift,X,Y) RETURN |
<SCRIPT EVENT="DblClick(Shift,X,Y)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function DblClick(Shift,X,Y) End Function </SCRIPT> Procedure OnComDblClick Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY Forward Send OnComDblClick llShift llX llY End_Procedure METHOD OCX_DblClick(Shift,X,Y) CLASS MainDialog RETURN NIL void onEvent_DblClick(int _Shift,int _X,int _Y) { } function DblClick as v (Shift as N,X as OLE::Exontrol.Expression.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Expression.1::OLE_YPOS_PIXELS) end function function nativeObject_DblClick(Shift,X,Y) return |
The following samples get the word from the cursor when the user double clicks the control:
VBA (MS Access, Excell...)
' DblClick event - Occurs when the user double clicks the left mouse button over an object. Private Sub Expression1_DblClick(ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long) With Expression1 Debug.Print( "Word: " ) Debug.Print( .WordFromPoint(-1,-1) ) End With End Sub With Expression1 .Expression = "value" .AllowSplitter = 2 .SplitPaneHeight = 196 End With
VB6
' DblClick event - Occurs when the user double clicks the left mouse button over an object. Private Sub Expression1_DblClick(Shift As Integer,X As Single,Y As Single) With Expression1 Debug.Print( "Word: " ) Debug.Print( .WordFromPoint(-1,-1) ) End With End Sub With Expression1 .Expression = "value" .AllowSplitter = exVSplitter .SplitPaneHeight = 196 End With
VB.NET
' DblClick event - Occurs when the user double clicks the left mouse button over an object. Private Sub Expression1_DblClick(ByVal sender As System.Object,ByVal Shift As Short,ByVal X As Integer,ByVal Y As Integer) Handles Expression1.DblClick With Expression1 Debug.Print( "Word: " ) Debug.Print( .get_WordFromPoint(-1,-1) ) End With End Sub With Expression1 .Expression = "value" .AllowSplitter = exontrol.EXPRESSIONLib.SplitterEnum.exVSplitter .SplitPaneHeight = 196 End With
VB.NET for /COM
' DblClick event - Occurs when the user double clicks the left mouse button over an object. Private Sub AxExpression1_DblClick(ByVal sender As System.Object, ByVal e As AxEXPRESSIONLib._IExpressionEvents_DblClickEvent) Handles AxExpression1.DblClick With AxExpression1 Debug.Print( "Word: " ) Debug.Print( .get_WordFromPoint(-1,-1) ) End With End Sub With AxExpression1 .Expression = "value" .AllowSplitter = EXPRESSIONLib.SplitterEnum.exVSplitter .SplitPaneHeight = 196 End With
C++
// DblClick event - Occurs when the user double clicks the left mouse button over an object.
void OnDblClickExpression1(short Shift,long X,long Y)
{
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXPRESSIONLib' for the library: 'Expression 1.0 Control Library'
#import <Expression.dll>
using namespace EXPRESSIONLib;
*/
EXPRESSIONLib::IExpressionPtr spExpression1 = GetDlgItem(IDC_EXPRESSION1)->GetControlUnknown();
OutputDebugStringW( L"Word: " );
OutputDebugStringW( spExpression1->GetWordFromPoint(-1,-1,vtMissing) );
}
EXPRESSIONLib::IExpressionPtr spExpression1 = GetDlgItem(IDC_EXPRESSION1)->GetControlUnknown();
spExpression1->PutExpression(L"value");
spExpression1->PutAllowSplitter(EXPRESSIONLib::exVSplitter);
spExpression1->PutSplitPaneHeight(196);
C++ Builder
// DblClick event - Occurs when the user double clicks the left mouse button over an object. void __fastcall TForm1::Expression1DblClick(TObject *Sender,short Shift,int X,int Y) { OutputDebugString( L"Word: " ); OutputDebugString( Expression1->WordFromPoint[-1,-1,TNoParam()] ); } Expression1->Expression = L"value"; Expression1->AllowSplitter = Expressionlib_tlb::SplitterEnum::exVSplitter; Expression1->SplitPaneHeight = 196;
C#
// DblClick event - Occurs when the user double clicks the left mouse button over an object. private void expression1_DblClick(object sender,short Shift,int X,int Y) { System.Diagnostics.Debug.Print( "Word: " ); System.Diagnostics.Debug.Print( expression1.get_WordFromPoint(-1,-1,null) ); } //this.expression1.DblClick += new exontrol.EXPRESSIONLib.exg2antt.DblClickEventHandler(this.expression1_DblClick); expression1.Expression = "value"; expression1.AllowSplitter = exontrol.EXPRESSIONLib.SplitterEnum.exVSplitter; expression1.SplitPaneHeight = 196;
JScript/JavaScript
<BODY onload="Init()"> <SCRIPT FOR="Expression1" EVENT="DblClick(Shift,X,Y)" LANGUAGE="JScript"> alert( "Word: " ); alert( Expression1.WordFromPoint(-1,-1,null) ); </SCRIPT> <OBJECT CLASSID="clsid:B33F5489-49AC-4155-98E7-9BBFC57FF019" id="Expression1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { Expression1.Expression = "value"; Expression1.AllowSplitter = 2; Expression1.SplitPaneHeight = 196; } </SCRIPT> </BODY>
VBScript
<BODY onload="Init()"> <SCRIPT LANGUAGE="VBScript"> Function Expression1_DblClick(Shift,X,Y) With Expression1 alert( "Word: " ) alert( .WordFromPoint(-1,-1) ) End With End Function </SCRIPT> <OBJECT CLASSID="clsid:B33F5489-49AC-4155-98E7-9BBFC57FF019" id="Expression1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With Expression1 .Expression = "value" .AllowSplitter = 2 .SplitPaneHeight = 196 End With End Function </SCRIPT> </BODY>
C# for /COM
// DblClick event - Occurs when the user double clicks the left mouse button over an object. private void axExpression1_DblClick(object sender, AxEXPRESSIONLib._IExpressionEvents_DblClickEvent e) { System.Diagnostics.Debug.Print( "Word: " ); System.Diagnostics.Debug.Print( axExpression1.get_WordFromPoint(-1,-1,null) ); } //this.axExpression1.DblClick += new AxEXPRESSIONLib._IExpressionEvents_DblClickEventHandler(this.axExpression1_DblClick); axExpression1.Expression = "value"; axExpression1.AllowSplitter = EXPRESSIONLib.SplitterEnum.exVSplitter; axExpression1.SplitPaneHeight = 196;
X++ (Dynamics Ax 2009)
// DblClick event - Occurs when the user double clicks the left mouse button over an object. void onEvent_DblClick(int _Shift,int _X,int _Y) { ; print( "Word: " ); print( expression1.WordFromPoint(-1,-1) ); } public void init() { ; super(); expression1.Expression("value"); expression1.AllowSplitter(2/*exVSplitter*/); expression1.SplitPaneHeight(196); }
Delphi 8 (.NET only)
// DblClick event - Occurs when the user double clicks the left mouse button over an object. procedure TWinForm1.AxExpression1_DblClick(sender: System.Object; e: AxEXPRESSIONLib._IExpressionEvents_DblClickEvent); begin with AxExpression1 do begin OutputDebugString( 'Word: ' ); OutputDebugString( get_WordFromPoint(-1,-1,Nil) ); end end; with AxExpression1 do begin Expression := 'value'; AllowSplitter := EXPRESSIONLib.SplitterEnum.exVSplitter; SplitPaneHeight := 196; end
Delphi (standard)
// DblClick event - Occurs when the user double clicks the left mouse button over an object. procedure TForm1.Expression1DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer); begin with Expression1 do begin OutputDebugString( 'Word: ' ); OutputDebugString( WordFromPoint[-1,-1,Null] ); end end; with Expression1 do begin Expression := 'value'; AllowSplitter := EXPRESSIONLib_TLB.exVSplitter; SplitPaneHeight := 196; end
VFP
*** DblClick event - Occurs when the user double clicks the left mouse button over an object. *** LPARAMETERS Shift,X,Y with thisform.Expression1 DEBUGOUT( "Word: " ) DEBUGOUT( .WordFromPoint(-1,-1) ) endwith with thisform.Expression1 .Expression = "value" .AllowSplitter = 2 .SplitPaneHeight = 196 endwith
dBASE Plus
/* with (this.EXPRESSIONACTIVEXCONTROL1.nativeObject) DblClick = class::nativeObject_DblClick endwith */ // Occurs when the user double clicks the left mouse button over an object. function nativeObject_DblClick(Shift,X,Y) local oExpression oExpression = form.EXPRESSIONACTIVEXCONTROL1.nativeObject ? "Word: " ? oExpression.WordFromPoint(-1,-1) return local oExpression oExpression = form.EXPRESSIONACTIVEXCONTROL1.nativeObject oExpression.Expression = "value" oExpression.AllowSplitter = 2 oExpression.SplitPaneHeight = 196
XBasic (Alpha Five)
' Occurs when the user double clicks the left mouse button over an object. function DblClick as v (Shift as N,X as OLE::Exontrol.Expression.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Expression.1::OLE_YPOS_PIXELS) Dim oExpression as P oExpression = topparent:CONTROL_ACTIVEX1.activex ? "Word: " ? oExpression.WordFromPoint(-1,-1) end function Dim oExpression as P oExpression = topparent:CONTROL_ACTIVEX1.activex oExpression.Expression = "value" oExpression.AllowSplitter = 2 oExpression.SplitPaneHeight = 196
Visual Objects
METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog // DblClick event - Occurs when the user double clicks the left mouse button over an object. OutputDebugString(String2Psz( "Word: " )) OutputDebugString(String2Psz( oDCOCX_Exontrol1:[WordFromPoint,-1,-1,nil] )) RETURN NIL oDCOCX_Exontrol1:Expression := "value" oDCOCX_Exontrol1:AllowSplitter := exVSplitter oDCOCX_Exontrol1:SplitPaneHeight := 196
PowerBuilder
/*begin event DblClick(integer Shift,long X,long Y) - Occurs when the user double clicks the left mouse button over an object.*/ /* OleObject oExpression oExpression = ole_1.Object MessageBox("Information",string( "Word: " )) MessageBox("Information",string( oExpression.WordFromPoint(-1,-1) )) */ /*end event DblClick*/ OleObject oExpression oExpression = ole_1.Object oExpression.Expression = "value" oExpression.AllowSplitter = 2 oExpression.SplitPaneHeight = 196
Visual DataFlex
// Occurs when the user double clicks the left mouse button over an object.
Procedure OnComDblClick Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY
Forward Send OnComDblClick llShift llX llY
Showln "Word: " (ComWordFromPoint(Self,-1,-1,Nothing))
End_Procedure
Procedure OnCreate
Forward Send OnCreate
Set ComExpression to "value"
Set ComAllowSplitter to OLEexVSplitter
Set ComSplitPaneHeight to 196
End_Procedure
XBase++
PROCEDURE OnDblClick(oExpression,Shift,X,Y) DevOut( "Word: " ) DevOut( oExpression:WordFromPoint(-1,-1) ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExpression oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExpression := XbpActiveXControl():new( oForm:drawingArea ) oExpression:CLSID := "Exontrol.Expression.1" /*{B33F5489-49AC-4155-98E7-9BBFC57FF019}*/ oExpression:create(,, {10,60},{610,370} ) oExpression:DblClick := {|Shift,X,Y| OnDblClick(oExpression,Shift,X,Y)} /*Occurs when the user double clicks the left mouse button over an object.*/ oExpression:Expression := "value" oExpression:AllowSplitter := 2/*exVSplitter*/ oExpression:SplitPaneHeight := 196 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN