ID: Q107518
2.50a WINDOWS kbprg kbfixlist kbbuglist
The information in this article applies to:
If you close FoxPro for Windows through the Windows Task List, the ON SHUTDOWN command doesn't execute, and control doesn't return to FoxPro for Windows. Instead, FoxPro for Windows flashes for a split second and then FoxPro disappears from the Task List. Then, when you attempt to quit Windows, the Windows message box (called by the ON SHUTDOWN command) appears and Windows hangs.
Microsoft has confirmed this to be a problem in FoxPro 2.5a for Windows. This problem was corrected in FoxPro 2.5b for Windows.
1. Create a program that contains the following code and call it
   FLLTEST.PRG:
      #DEFINE MB_ICONHAND 16
      #DEFINE MB_OK 0
      SET LIBRARY TO foxtools.fll
      MsgBox=RegFn("MessageBox","ICCI","I")
      result=CallFn(MsgBox,0,"You can not close FoxPro this way", ;
         "Close FoxPro Correctly",MB_ICONHAND+MB_OK)
      WAIT WINDOW "Please Hit Any Key to Continue"
      RELEASE LIBRARY foxtools.fll
      ON SHUTDOWN
   TEST.SPR:
      CLEAR
      @1,1 SAY "Input x" GET x DEFAULT SPACE(10)
      READ CYCLE
      ON SHUTDOWN DO flltest.prg
      DO test.spr
6. Click any where outside Program Manager or press CTRL+ESC.
7. In the Task List window, select Microsoft FoxPro, and choose End Task.
   FoxPro will come up for a split second and then close down. It will no
   longer appear in the Task List.
   message box (called by the ON SHUTDOWN command) will appear, and then
   Windows will hang.
Additional reference words: FoxWin 2.50a buglist2.50a fixlist2.50b KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: FxprgFoxtools
Keywords          : FxprgFoxtools kbbuglist kbfixlist
Version           : 2.50a
Platform          : WINDOWS
Solution Type     : kbfixLast Reviewed: October 16, 1997