Hello,

Does anyone know if there is an event handler that can determine when
all files have been closed.  I want to use the event handler to gray out
a button.

However after 'close all' from the file menu neither winchangedhandler,
winfocuschangedhandler or WinClosedHandler work and the button only
becomes disabled once the user presses a button on the toolbar, any
ideas why?

I've been using the following code:

Sub WinFocuschangedHandler
                Call HandlerRoutine
End sub
'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
sub WinchangedHandler
                Call HandlerRoutine
End sub
'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
sub WinClosedHandler
                Call HandlerRoutine
End sub
'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Sub HandlerRoutine

If Frontwindow() = 0 then 
        Alter button MT_Export_Layout Disable
                Alter button MT_Export_Table Disable
                        exit sub else end if

        If windowinfo(Frontwindow(),Win_Info_Type) <> Win_layout then 
                Alter button MT_Export_Layout Disable else Alter button 
MT_Export_Layout Enable end if

End sub

Thanks in advance,

Giles Sutton
Marishal Thompson and Company
-- 
  Giles
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to