Article ID: 187743
Article Last Modified on 8/26/1999
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
**************************************************
*-- Form: form1
*-- ParentClass: form
*-- BaseClass: form
*
DEFINE CLASS form1 AS form
Top = 1
Left = 2
Height = 350
Width = 474
DoCreate = .T.
OLEDropMode = 1
Caption = "Try to move the form by dragging after right "+ ;
"clicking the button"
WindowState = 0
BackColor = RGB(0,128,128)
Name = "Form1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 120, ;
Left = 240, ;
Height = 73, ;
Width = 97, ;
Caption = "Right Click Me", ;
Name = "Command1"
PROCEDURE command1.MouseDown
LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF nButton=2
* NODEFAULT
This.OLEDrag(.T.)
ENDIF
ENDPROC
PROCEDURE command1.OLEDrag
LPARAMETERS lDetectDrag
IF lDetectDrag
This.ForeColor=RGB(0,255,64)
ELSE
This.ForeColor=RGB(255,0,255)
ENDIF
ENDPROC
PROCEDURE command1.OLECompleteDrag
LPARAMETERS nEffect
This.ResetToDefault("ForeColor")
ENDPROC
PROCEDURE command1.OLEStartDrag
LPARAMETERS oDataObject, nEffect
nEffect=3
ENDPROC
ENDDEFINE
185654 HOWTO: Starting OLE Drag and Drop In Manual Mode
184386 HOWTO: Using OLE Drag & Drop to Move Controls on a Form
186919 HOWTO: Manual Mode OLE Drag & Drop & Mouse Pointer Changes
Additional query words: kbFVp600 FxprgClassoop
Keywords: kbprb KB187743