Hi, We're trying to prevent users from closing windows by mistake. I've set the window required to the front then used:
dockMgr = GetDockingManager(theMapInfoApplication)
iWinThis = GetDockingManagerActiveWindow(dockMgr)
Call SetDockingManagerProperty(dockMgr, iWinThis,"IsContextMenuButtonVisible","false")
Call SetDockingManagerProperty(dockMgr, iWinThis,"IsContextMenuVisible","false")
Call SetDockingManagerProperty(dockMgr, iWinThis, "CanClose", "false")
The 'CanClose' disables the cross in the window but they can still right click and close/clone the window via the right click menu. I thought the first two commands would have disabled the menu.
we also include:
Call SetDockingManagerProperty(dockMgr, iWinThis, "CanDrag", "false")
Call SetDockingManagerProperty(dockMgr, iWinThis, "CanDock", "true")
Call SetDockingManagerProperty(dockMgr, iWinThis, "CanFloat", "false")
Call SetDockingManagerProperty(dockMgr, iWinThis, "State", "Document")
to lock down what the user can do, I'm not sure if this would have affected the menu commands.
We're still using MBv16.0.3 with MIv16.0.3, so if this is fixed in v17 then we'll have to live with it until we upgrade everyone.
Thanks
David