The problem might be that the WinClosedHandler is called before the window is "completely" closed, so when tiling the windows MapInfo is seing three windows, not only two as you suspect.
Peter Horsb�ll M�ller GIS Developer 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] http://www.cowi.dk *****CHANGE OF ADDRESS - COWI's offices in Odense are now under the same roof***** On December 8th. 2003, Geographical Information & IT moved from Rugaardsvej 55, 5000 Odense C to Odensevej 95, 5260 Odense S. Please note our new telephone, direct and telefax numbers. > -----Original Message----- > From: David Baker [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 31, 2004 2:44 PM > To: [EMAIL PROTECTED] > Subject: MI-L Menu command doesn't work in Sub WinClosedHandler > > > I have 3 browse windows & a map window open, all tiled. When > the user closes the > map window, I want to re-tile the 2 browser windows so that > they fill up the whole > screen. So, I have the following code: > > The strange thing is that the event handler is firing - the 2 > Print statements output their > strings to the Message window. However, the tiling never > occurs. If I have the exact > same command outside the WinClosedHandler, the menu command > to tile the > windows works fine. Selecting the Tile Windows command from > the menu works fine & > so does Shift-F4. I'm figuring that there is something > different/strange with the > WinClosedHandler event handler that won't allow some commands? > > Any ideas? I've tried both 611 & "M_WINDOW_TILE" in the code > below. I'm using MI & > MB 4.5. Can't find anything on this in the DirectsMag archives. > > > Include "MAPBASIC.DEF" > Include "menu.def" > > Sub WinClosedHandler > > ' Tiles remaining window(s). > Print "Run Menu Command 611 started" > Run Menu Command M_WINDOW_TILE ' 611 > Print "Run Menu Command 611 finished" > > End Sub > > > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | > www.directionsmag.com | To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > Message number: 10189 > > > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 10190
