Disable select box ?

Feb 7, 2014 at 6:01 PM
Hi,

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,

Olivier
Feb 7, 2014 at 6:18 PM
So far, I managed to do that with SendKeys.Send("{ESC}") at the end of my code.
Coordinator
Feb 10, 2014 at 11:28 AM
I think you should set AxMap.SendSelectBoxDrag and/or AxMap.SendSelectBoxFinal to false:
http://www.mapwindow.org/documentation/mapwingis4.8/group__map__interaction.html#ga0f6de25029c785aea4b3098fae626b57

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

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.

Olivier
4.8.8


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 1:48 PM
How about axMap1.CursorMode = MapWinGIS.tkCursorMode.cmNone;

Don
Feb 10, 2014 at 2: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 12:44 PM
DonRahmlow wrote:
How about axMap1.CursorMode = MapWinGIS.tkCursorMode.cmNone;

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

Don
Feb 19, 2014 at 12:58 PM
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 !)