Click or drag to resize

AppWindow.OLEDrop Method (Typed)

X#
Called whenever the mouse is released within the window's client area during a drag and drop operation.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD OLEDrop(
	oOleDragEvent
) AS USUAL CLIPPER
Request Example View Source

Parameters

oOleDragEvent (Optional)
Type: Usual
The specified OLEDragEvent object.

Return Value

Type: Usual
Remarks
Tip Tip
Important! This is a callback method used by X#. Normally, it should not be called in your application code.
The OLE runtime engine calls the following event handlers after an AppWindow object has been registered as an OLE drag and drop target: OLEDragEnter(), OLEDragOver(), OLEDragLeave(), and OLEDrop(). By investigating the passed OLEDragEvent object (for example, a specific server), you can allow or disallow a drag and drop action by returning TRUE or FALSE. This also affects the appearance of the drag and drop cursor. By default OLEDrop() returns TRUE. The typical response to the OLEDrop() event is to create a new OLE object by using the CreateFromOLEDragEvent() method.
Tip Tip
In derived classes you can implement your own OLEDrop handlers to customize the default behavior.
Tip Tip
This method is only available when you include the OLE library in the application's search path.
Examples
The following example is from the OLE Container application in ...\SAMPLES\OLE\CONT:
X#
 1METHOD OleDrop(oOleDragEvent) CLASS Container
 2LOCAL oOle AS OleObject
 3LOCAL p AS point
 4LOCAL lRet := FALSE AS LOGIC
 5oOle := DraggableOLEObject{SELF}
 6oOle:AllowInPlace   := TRUE
 7oOle:AllowResize   := TRUE
 8oOle:AutoSizeOnCreate := TRUE
 9IF (oOle:CreateFromOleDragEvent(oOleDragEvent))
10p := oOleDragEvent:Position
11SELF:SetupOLEObject(oOle, p)
12lRet := TRUE
13ENDIF
X#
1RETURN lRet
See Also