Thanks for the advice, Spencer. I'll consider all that. Cheers
Terry -----Original Message----- From: Spencer Simpson [mailto:[EMAIL PROTECTED] Sent: 05 April 2006 14:31 To: Terry McDonnell Subject: RE: [MI-L] Menus - swapping in and out Another possibility is to copy the Create Menu Bar statement from the end of "Mapinfow.mnu" into your program. This has the advantage of leaving the configurations of the other menus alone. But since your application replaces the MapInfo menu bar with its own menu bar, you should think about whether it's compatible with other MapBasic applications. The other applications respond to the same event handlers your application does, and can possibly alter the menu bar themselves. You don't want that: It's as if the application were working with a MapInfo runtime. For such an application, I recommend that the EndHandler routine contain an End MapInfo statement. When the application closes, MapInfo does as well. To use "regular" MapInfo your users would start a new MapInfo. No code to swap menus in an out would be necessary. For the same reason, I'd recommend against adding a "TerrysMenu" to the menu bar. If you want your own submenu, add it to the "Tools" menu. Hope this helps Spencer ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Horsbøll Møller Sent: Wednesday, April 05, 2006 8:33 AM To: Terry McDonnell; [EMAIL PROTECTED] Subject: RE: [MI-L] Menus - swapping in and out Terry, A few suggestions, but none completely safe ... 1. Restoring the standard MapInfo Pro menu bar: Create Menu Bar As Default This has the sideeffect that any 3rd part tools embedded in the menus, are gone/lost. I think what actually happens is, that MapInfo reloads the MapInfow.mnu. You could then consider running the MapBasic applications again ... 2. Hiding/removing your own menu: Alter Menu Bar Remove "TerrysMenu" This will remove your menu from the Menu Bar, but not restore the default MapInfo Pro menu structure. When you remove the menu, you don't destoy it, so you can easily add the menu again with: Alter Menu Bar Add "TerrysMenu" If you have embedded your own menus in other menus, you could use this syntax: Alter Menu ID 1 Remove "TerrysMenu" Unfortunately, you can't toggle between two menu bars ... Peter Horsbøll Møller GIS Developer, MTM Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.cowi.dk/gis ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Terry McDonnell Sent: Wednesday, April 05, 2006 2:02 PM To: [EMAIL PROTECTED] Subject: [MI-L] Menus - swapping in and out Hi Listers I have my own menu bar items set up but, for testing purposes, I've allowed the standard MI menus to stay up (so I can make GOOD use of them). Now I want to: Replace the std MI menu with my own When the user closes my app's window I want my menus to disappear and the std. MI menu to replace it. This is because my users use native MI too and want to be able to simply revert to this. Now I know all about usng the WinClosedHandler() to bring this about - at the moment I just disappear all my windows. What I'd like is to know a simple and efficient way of achieving the above. The Menu Bar Hide command doesn't specify WHICH menu to hide/show. Is there some way of swapping menus in and out? 'ppreciate it Terry McDonnell _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l