home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / end_task / endtask.txt < prev    next >
Text File  |  1992-08-01  |  754b  |  27 lines

  1. ENTASK.DLL -- Author Jeff Simms -- CIS 72200,3173 -- August 1, 1992
  2.  
  3. When End Task is selected from the Task List it sends a WM_CLOSE message to the VB apps "invisible parent" window (classname ThunderRTMain) who does not pass it on. ENTASK.DLL hooks into this window and redirects the message to a form of your choice.
  4.  
  5. Public Domain
  6.  
  7.  
  8. Declare Sub SetEndTaskHook Lib "ENTASK.DLL" (ByVal hWnd As Integer)
  9. Declare Sub UndoEndTaskHook Lib "ENTASK.DLL" (ByVal zero As Integer)
  10.  
  11. Usage:
  12.  
  13. In Form_Load...  Call SetEndTaskHook(hWnd)
  14.  
  15. In Form_Unload... Call UndoEndTaskHook(0)
  16.  
  17.  
  18. Notes:
  19.  
  20. 1) You must call UndoEndTaskHook for proper cleanup.
  21.  
  22. 2) Do not use END for same reason.
  23.  
  24. 3) Doesn't work in VB run environment
  25.  
  26. * Use at own risk *
  27.