Disable select box ?

Feb 7, 2014 at 5:01 PM

I have an application that add point to a shape. My problem is that each time I select a point, the selectbox rectangle appears between the selected point and the cursor. I didn't find a way to disable it. Is there a way to avoid that ?

Thanks very much,

Feb 7, 2014 at 5:18 PM
So far, I managed to do that with SendKeys.Send("{ESC}") at the end of my code.
Feb 10, 2014 at 10:28 AM
I think you should set AxMap.SendSelectBoxDrag and/or AxMap.SendSelectBoxFinal to false:

In Visual Studio these settings can be changed when you select the map control.
Feb 10, 2014 at 11:01 AM
Edited Feb 10, 2014 at 11:05 AM

Thanks for your reply but it doesn't work.
                .SendSelectBoxDrag = False
                .SendSelectBoxFinal = False
I tried also things like

.shp.CacheExtents() = True
shp.FastMode = True

But neither worked.

Users select a data point to place new object and I open a form to select which point type is to be placed => I always get the drag box between the data point and the point on this form.


Edit : By the way, I tried also to avoid the new point to be centered but it doesn't work either.
Feb 10, 2014 at 12:48 PM
How about axMap1.CursorMode = MapWinGIS.tkCursorMode.cmNone;

Feb 10, 2014 at 1:31 PM
Thanks for this idea, I thought it would do the trick but it does'nt work either. I tried that :

Dim cursmem As MapWinGIS.tkCursorMode
cursmem = winmap.CursorMode
.CursorMode = MapWinGIS.tkCursorMode.cmNone

'call form and insert point here

winmap.CursorMode = cursmem
winmap .Redraw()

After that, the new point appears with the rubber band rectangle between it and the cursor. Then,if I do a right click, selection box disappears and the new point is automatically centered in the map. Of course, I have no code to manage right click.
Feb 19, 2014 at 11:44 AM
DonRahmlow wrote:
How about axMap1.CursorMode = MapWinGIS.tkCursorMode.cmNone;

I finally made it work, axMap1.CursorMode = MapWinGIS.tkCursorMode.cmNone; is the good answer.
Feb 19, 2014 at 11:51 AM
Nice perseverance, Olivier! The mouse handling can be a bit tricky...

Feb 19, 2014 at 11:58 AM
Yes Don, I'm very happy with Mapwingis and understand that most (all?) errors come from oneself at the beginning. So I encourage everyone to look deeply at the class descriptions and think twice before posting (even I don't always, sorry for that !)