Mike Lewis
Programmer
I am writing code to let the user drag an object around a form. The form is divided into two areas: one where the user is free to drop the object, and a "no-drop" zone where they can't.
This is all working fine, except that I'd like to change the mouse pointer, to indicate where dropping is allowed.
So far, I have this code in the form's OLEDragOver:
I can see from the Wait window that nEffect is being correctly set.
In the OLEGiveFeedback event of the object being dragged (that is, the drag source), I have this code:
I'm finding that, during the drag, the mouse cursor is initially correct, but it doesn't change as the mouse moves between the two zones. In other words, it always shows the cursor as it should be at the point where the user starts dragging. I can't see how to make it change during the course of the drag.
Can anyone help me out on this?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk
This is all working fine, except that I'd like to change the mouse pointer, to indicate where dropping is allowed.
So far, I have this code in the form's OLEDragOver:
Code:
LPARAMETERS oDataObject, nEffect, nButton, nShift, ;
nXCoord, nYCoord, nState
IF nXCoord < 50 AND nYCoord < 100
* This is the no-drop zone
nEffect = 0
ELSE
nEffect = 1
ENDIF
* Next line is for debugging only
WAIT WINDOW nEffect NOWAIT
I can see from the Wait window that nEffect is being correctly set.
In the OLEGiveFeedback event of the object being dragged (that is, the drag source), I have this code:
Code:
LPARAMETERS nEffect, eMouseCursor
* In the next line, 12 means no-drop cursor
eMouseCursor = IIF(nEffect = 0, 12, 0)
I'm finding that, during the drag, the mouse cursor is initially correct, but it doesn't change as the mouse moves between the two zones. In other words, it always shows the cursor as it should be at the point where the user starts dragging. I can't see how to make it change during the course of the drag.
Can anyone help me out on this?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk