I am experiencing some rather strange behavior with the AxMap OCX control. I am using version 5.2.4. I am not using version 5.3 as it constantly crashes.
I am attempting to set up and use the drag feature. At the start, I have configured the control as follows:
CursorMode = tkCursorMode_cmIdentify
SendMouseDown = .T.
SendMouseUp = .T.
The code to set up and initiate the drag function is in the MouseDown method. Once I have the data set up, I issue a This.Drag(1) command to start the drag function by clicking and holding the right mouse button over the source object. (More on that in a moment) I then drag the mouse over to a target object on another form and then drop on it. The function works and the data is processed as expected. Here are my issues.
The first issue is, for some reason, the mousedown funtion will not recognize a left mouse click. After scrathcing my head for an hour, I placed some code in the event to capture and report the “button” parameter value. When I use a right click, I get a report that the value is “2” which is what I expected. When I use a left click, nothing! Not even a report. The left click doesn’t even fire the event. I swapped out my mouse with another mouse and still nothing on the left click. I tested both devices in another application and the left clicks did fire the mousedown event. So the devices aren’t the problem.
The second problem is that the MouseUp event never fires. I placed “This.Drag(0)” in this event to terminate the drag once I’ve reached the target object and released the mouse button. I’ve tested this with both left and right mouse clicks and the MouseUp event never fires. I doubled checked the SendMouseUp to make sure that it was set to true and it was. As a result, once I reach the target object and release the mouse button, nothing happens and the drag icon remains. If I then click either mouse buttong, the task completes and processes the data as I want it to do.
What am I not doing correctly? Or is there an issue with the OCX?
Thanks!